[RESOLVED] Passing values from one page to another???
I have a web page that contains a GridView which the user is allowed to "Edit", "Delete" and "Select" rows. What I'm trying to accomplish is when a user clicks on "Edit", they are redirected to another web page that contains a DetailsView of the record they selected from the GridView (previous page). How do I make the association?
Thanks,
Re: Passing values from one page to another???
I hope you will populate the gridview from some data source, While clicking the edit button pass the ID of the row selected row either using QueryString/ViewState and fetch the value from db and display in the details view
Re: Passing values from one page to another???
I'm not sure how to do that. Got any examples?
Re: Passing values from one page to another???
Here is the sample with edit in popup screen. Apply the same logic for your next page
Re: Passing values from one page to another???
Blake,
How are you binding the columns in the GridView currently?
If you are using TemplateField's, or even a HyperLink Field, you should be able to manipulate the data that is being put into that column in the GridView RowDataBound event, to set the link, including the ID of the Item that you want to edit.
Here are some examples:
http://authors.aspalliance.com/aspxt...ogridview.aspx
http://www.codeproject.com/KB/webfor...linkfield.aspx
Gary
Re: Passing values from one page to another???
Re: Passing values from one page to another???
Thanks guys,
All your suggestions were helpful!
Re: [RESOLVED] Passing values from one page to another???