Rajaa Khalifeh

Rajaa Khalifeh

  • NA
  • 53
  • 6.5k

Passing 3textbox Values into another page using query string

Apr 11 2020 11:18 AM
I am trying to pass values from my gridview to another form but the problem that i have 3 textboxes with the same column name.. so i need to take the first value to the first textbox and second value to the second textbox etc...
 
Mycode in gridview is :
  1. <asp:HyperLinkField Text="Edit" Target="_blank" DataNavigateUrlFields="StdId,Student Name,Gender,Date Of Birth,School,Phone Number1,Email,Start Date" DataNavigateUrlFormatString="NewStd.aspx?StdId={0}&Student Name={1}&Gender={2}&Date Of Birth={3}&School={4}&Phone Number1={5}&Email={6}&Start Date={7}" />  
In my second form when page loads:
  1. if (!IsPostBack)  
  2. {  
  3. string id = Request.QueryString["StdId"];  
  4. Label2.Text = id;  
  5. firstxt.Text + midtxt.Text + Lasttext.Text = Request.QueryString["Student Name"];  
  6. // error in this code  
  7. Genderdroplist.SelectedValue= Request.QueryString["Gender"];  
  8. DOBTxt.Text = Request.QueryString["Date Of Birth"];  
  9. Schooltxt.Text = Request.QueryString["School"];  
  10. Numbertxt.Text = Request.QueryString["Phone Number1"];  
  11. EmailTxt.Text = Request.QueryString["Email"];  
  12. StartDatetxt.Text = Request.QueryString["Start Date"];  
  13. }  
so the problem is in the student name field with these 3 textboxes..
 
any help please with this code.
thanks

Answers (4)