all groups > asp.net datagrid control > september 2006 >
You're in the

asp.net datagrid control

group:

Gridview selected Row displayed on second aspx page


Gridview selected Row displayed on second aspx page Newbie3
9/29/2006 1:53:32 PM
asp.net datagrid control:
Hi, I am working on a Knowledgebase page that will post the selected row onto
another page. So for example, I have Page1.aspx which contains my gridview.
The gridview control is retrieving the data from the database and displaying
it. That's working. I also have a .CS page for Page1. Page2.aspx has a
detailsview control which should display the selected row value from the
gridview control on Page1.aspx. I did not create a .CS page for Page2.aspx.
How can I call the gridview control from Page2.aspx so that I can display the
selected row from Page1? Thanks in advance for any advice.
Re: Gridview selected Row displayed on second aspx page Tim_Mac
10/3/2006 12:41:57 PM
hi,
in the SelectedIndexChanged event for your GridView i would use something
like:
Response.Redirect("Page2.aspx?ID=" + RowIdFromGridView)

you could then use a querystring parameter for your DetailsView datasource
in Page2. probably don't need a code behind file for Page2.

good luck
tim


[quoted text, click to view]

AddThis Social Bookmark Button