File: Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="QueryStringSender" %>
Untitled Page
File: Default.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class QueryStringSender : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void cmd_Click(object sender, EventArgs e)
{
Response.Redirect("NextPage.aspx" + "?Version=" +
((Control)sender).ID);
}
}
File: NextPage.aspx
<%@ Page Language="C#"
AutoEventWireup="true"
CodeFile="NextPage.aspx.cs"
Inherits="QueryStringRecipient" %>
Untitled Page
File: NextPage.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class QueryStringRecipient : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
lblDate.Text = "The time is now:
" + DateTime.Now.ToString();
switch (Request.QueryString["Version"])
{
case "cmdLarge":
lblDate.Font.Size = FontUnit.XLarge;
break;
case "cmdNormal":
lblDate.Font.Size = FontUnit.Large;
break;
case "cmdSmall":
lblDate.Font.Size = FontUnit.Small;
break;
}
}