Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This is because you are sending text/string inside RowIndex while as RowIndex i.e the index for accessing the Rows collection should be an integer. What you pass into rowindex is 'lblemail.Textlblmobno.Text' and when you try to parse it into int it throws an obvious error.</p> <p>Update: Ok, you don't need to pass the rowIndex.</p> <p>First change:- </p> <pre><code>String email=lblEmail.Text; String mob=lblMob.Text; </code></pre> <p>Second change:-</p> <p>Rename the querystring parameters to more meaningfull names (i have done it in code below renamed rowIndex to email)</p> <p>third change:-</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { String email= Request.QueryString["email"]; String mobNumber= Request.QueryString["mob"]; String yourThirdParameter = Request.QueryString["thirdOne"]; // Provide your third parameter. SqlDataAdapter da = new SqlDataAdapter("insert into login values('" + email + "','" + mob + "','" + yourThirdParameter + "')",con); // Assuming this is the sequence.you can change it your way. DataSet ds = new DataSet(); da.Fill(ds); } protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Redirect") { String email = lblemail.Text; String mob = lblmobno.Text; String thirdOne= // Fill it as is the need Server.Transfer("activate.aspx?email=" + email+"&amp;mob=" +mob+"&amp;thirdOne="+thirdOne, true); } } </code></pre> <p>ALert:- As i suspect if you have to pass the Password as well then QueryString should not be used. Also passing email , mobile numbers in QueryString is not advisable.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload