What I exactly want is,
when I click on gridview ,that entire row data should be passed on this newly opened webform.This webform shall contain required fields.
for example
Webform contain
textboxes for say, Sno ,Sname
and my grid contain say 5 records on Sno,Sname when I click on first row ,that row details shall be moved on this textboxes and this page shall be opened as a new window.
cross page posting I need to perform but on click of gridview row.
Please help. I shall be grateful to you all.
What I have tried:
I have tried the above said, but all I am able to do is to pass the data to a new webform on selectIndexchanging event
I am not able to open a new popup window.
protected void gdvUserList_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
{
SqlConnection scon = new SqlConnection();
SqlDataAdapter sda = new SqlDataAdapter("select * from LoginD", scon);
DataSet ds = new DataSet();
sda.Fill(ds, "LG");
string url;
url = "NewUser.aspx?id=" + gdvUserList.Rows[e.NewSelectedIndex].Cells[1].Text +
"&Name=" + gdvUserList.Rows[e.NewSelectedIndex].Cells[2].Text +
"&LName=" + gdvUserList.Rows[e.NewSelectedIndex].Cells[3].Text +
"&Dept=" + gdvUserList.Rows[e.NewSelectedIndex].Cells[4].Text +
"&Ugroup=" + gdvUserList.Rows[e.NewSelectedIndex].Cells[5].Text +
"&Desig=" + gdvUserList.Rows[e.NewSelectedIndex].Cells[6].Text
+ "&Report=" + gdvUserList.Rows[e.NewSelectedIndex].Cells[7].Text +
"&Username=" + ds.Tables["LG"].Rows[0][3].ToString() +
"&Password=" + ds.Tables["LG"].Rows[0][4].ToString() +
"&Email=" + ds.Tables["LG"].Rows[0][6].ToString() +
"&Mobile=" + ds.Tables["LG"].Rows[0][8].ToString() +
"&Branch=" + ds.Tables["LG"].Rows[0][10].ToString() +
"&Org=" + ds.Tables["LG"].Rows[0][9].ToString() +
"&Category=" + ds.Tables["LG"].Rows[0][12].ToString();
Response.Redirect(url);