|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
GridView and DetailsView/FormView in seperate pagesHi;
Can I use the CommandField ShowSelectButton='True' to go to a DetailsView or FormView on a sperate page. Or do I need to use a HyperLinkField? Hi Dave,
As for make the redirection to another page, I think both the select button in commandfield and a hyperlink field can do the work. for using commandfield, you can just hook the GridView's "SelectedIndexChanging" event and do the redirection(Response.Redirect ...) there. for hyperlink field, you can just generate the link url you want to redirect during the databinding period of the field. You're free to use either one. Please feel free to let me know if there is anything else unclear. Regards, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) Hi;
Is one approach the "suggested" one or is either ok? If both are ok I think I prefer the hyperlink so I see what is happening when looking at the .aspx file. Show quoteHide quote "Steven Cheng[MSFT]" wrote: > Hi Dave, > > As for make the redirection to another page, I think both the select button > in commandfield and a hyperlink field can do the work. for using > commandfield, you can just hook the GridView's "SelectedIndexChanging" > event and do the redirection(Response.Redirect ...) there. for hyperlink > field, you can just generate the link url you want to redirect during the > databinding period of the field. You're free to use either one. > > Please feel free to let me know if there is anything else unclear. > > Regards, > > Steven Cheng > Microsoft Online Support > > Get Secure! www.microsoft.com/security > (This posting is provided "AS IS", with no warranties, and confers no > rights.) > > Thanks for your quick response Dave,
IMO, I also prefer the hyperlink approach since that doesn't require additional server-side processing in our gridview's postback event(directly redirect the user to the new page through the URL). Regards, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
Are you sure? for delete in GridView
FormView vs create How to get CommandField and ButtonField in the toolbox? Binding TextBox DropDownlist problem Creating Dynamic controls Disable CommandField for some rows of data FormView sample that includes edit/delete? DataView, DataTable, or DataSet? GridView and XmlDataSource not refreshing. |
|||||||||||||||||||||||