<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server"> 1:
2:
3: private String queryString;
4:
5: protected void Page_PreRender(object sender, EventArgs e) {
6: if (!String.IsNullOrEmpty(queryString)) {
7: Button1.PostBackUrl = queryString;
8: }
9: }
10:
11: protected void Page_Load(object sender, EventArgs e) {
12: queryString = "?foo=bar;a=b";
13: }
14:
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Change Response QueryString</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="PostBackWithQueryString" />
</div>
</form>
</body>
</html>