Use of query string


 

//In "Source.aspx" On Button Click Event
private void BtnGo_Click (object sender, System.EventArgs e)
{
          string myURL;
          //Store Whole Querystring Into The URL String Variable...
          myURL="Destination.aspx?UName=" + txtUName.Text;
          Response.Redirect(myURL);
}



//In "Destination.aspx" On Page Load Event
private void Page_Load (object sender, System.EventArgs e)
{
          //Store Value Of UName Into LblUName Lable
          LblUName.Text=Request.QueryString["UName"];
}


Ebook Download
View all
Learn
View all