Home.aspx
page using the GET method to redirect to the page:
NextPage.aspx?Name=Poke+Mon&Email=pokemon%40cs.und.edu
⇒ Submit |
Home.aspx.cs |
using System; using System.Web; namespace WebApplication8 { public partial class Home : System.Web.UI.Page { protected void Button1_Click( object sender, EventArgs e ) { Response.Redirect( "NextPage.aspx?Name=" + Server.HtmlEncode( Name1.Text ) + "&Email=" + Server.HtmlEncode( Email1.Text ) ); } } } |
NextPage.aspx.cs |
using System; namespace WebApplication8 { public partial class NextPage : System.Web.UI.Page { protected void Page_Load( object sender, EventArgs e ) { Result.Text = "Name: <b>" + Server.HtmlDecode( Request.QueryString["Name"] ) + "</b>Email address: <b>" + Server.HtmlDecode( Request.QueryString["Email"] ) + "</b>"; } } } |