Pass and Get the Query String Value on Second Page

You can pass the parameter value after ? sign. following is the code to create query string.
  1. protected void btnSend_Click(object sender, EventArgs e)  
  2. {  
  3. Response.Redirect("Default2.aspx?UserId="+txtUserId.Text+"&UserName="+txtUserName.Text);  
  4. }  
But You can get the value on second page using two way.
  1. protected void Page_Load(object sender, EventArgs e)  
  2. {  
  3. if(!IsPostBack)  
  4. {  
  5. lblUserId.Text = Request.QueryString["UserId"];  
  6. lblUserName.Text = Request.QueryString["UserName"];  
  7. }  
  8. }  
  9. Or  
  10.   
  11. protected void Page_Load(object sender, EventArgs e)  
  12. {  
  13. if(!IsPostBack)  
  14. {  
  15. lblUserId.Text = Request.QueryString[0];  
  16. lblUserName.Text = Request.QueryString[1];  
  17. }  
  18. }