I have a grid view and I show data on grid view from a table.
I want to the same data to be shown which i am showing in grid view in a format of form using table when i click on edit button.
How can i do that in asp.net??
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Vishal GilbileRank #268 · 9.4K reputationPosted Mar 15, 2013, 4:15 AM EDT
If your gridview contains TemplateFields then kindly make use of Hyperlink field where you want to display Link on whose click it should redirect to next page passing certain values.
You will have to set the following properties of the Hyperlink field, They are as follows.
HeaderText:= The Text To be displayed as a Column Name Of GridView.
DataTextField:= The Text to be displayed as a Data (link) in the hyperlink column.
DataNavigateUrlFields:= The Column Name whose value you need to pass when the hyperlink is clicked.
and lastly
DataNavigateUrlFormatString:=The name of the page on which to redirect
eg: DataNavigateUrlFormatString=pageName.aspx?eid={0}
the place holder value will automatically be taken from the DataNavigateUrlField property which you specified above.
Hope that solves your problem.
With Regards,
Vishal Gilbile.
Dnyandeo Shinde31 reputationPosted Mar 18, 2013, 4:39 AM EDT