Home All Groups Group Topic Archive Search About

GridView and DetailsView/FormView in seperate pages

Author
16 Mar 2006 10:55 PM
David Thielen
Hi;

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?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Author
17 Mar 2006 3:18 AM
Steven Cheng[MSFT]
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.)
Author
17 Mar 2006 3:30 AM
David Thielen
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.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com



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.)
>
>
Author
17 Mar 2006 6:33 AM
Steven Cheng[MSFT]
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.)