Click here to Skip to main content
16,000,371 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
hi,
there is a button control in gridview template,if i click ,the selected row data will be displayed in textbox and also the selected row data will be transferred to next page.
pls tell me
Posted
Updated 11-Feb-11 1:42am
v2
Comments
Sunasara Imdadhusen 11-Feb-11 7:43am    
How to pass data from one page to another using Query string or Session?
Monjurul Habib 11-Feb-11 9:26am    
Please share your code,so that we can give you the exact solution.

Hi,
Following is example of Query String.

C#
protected void GridView1_SelectedIndexChanged(object sender,
EventArgs e)
{
// Get the currently selected row using the SelectedRow
property.
GridViewRow row = GridView1.SelectedRow;
TextBox2.Text = row.Cells[2].Text;

Response.Redirect("NextPage.aspx?User=" + row.Cells[0].Text + "&Address=" +  row.Cells[1].Text;
}



Thanks,
Imdadhusen
 
Share this answer
 
hell.. this won't solve prob..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900