Hi I have a gridview with a select button that when the user hit's It will take them to a new page. Just wondering how I do this?

Thanks in advance.

Recommended Answers

All 2 Replies

Also the user will be searching using a code and that is what will be being displayed in the gridview. When they hit select to go to the next page the code they used to search with should be displayed on the new page. How do I do this, is it a session variable?

One of the easiest ways to accomplish this is to add a hyperlink control. You can do this via the GUI-design view by right clicking the Gridview and modifying the field properties.

Then for the hyperlink, you can modify the DataNavigateUrlFields and DataNavigateUrlFormatString properties.

Here is a similar question with sample code on the asp.net forum:
http://forums.asp.net/t/1060749.aspx/1

You pass the information from one page to another via a query string in the URL.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.