Gridview cross-page postback

  • Thread starter Thread starter Lupakkiotto
  • Start date Start date
L

Lupakkiotto

HI!
Is it possible for a select command in a gridview to cross-page postback?
How to do it? I don't find a postbarckURL property...
Thank you in advance.
Marco
 
You probably need to create a TemplateField and add a Button or LinkButton
to it to get the PostBackUrl property functionality.
 
Christopher Reed said:
You probably need to create a TemplateField and add a Button or LinkButton
to it to get the PostBackUrl property functionality.


That's ok.
But, how can I know the selectedvalue of the gridview when I click on that
button??
 
You can to create a "HyperLinkField" and assign it properties like this:

<asp:HyperLinkField DataTextField="Data" DataNavigateUrlFields="id"
DataNavigateUrlFormatString="~/MonitoringPages/Mon.aspx?Id={0}"
target="_blank" />

In the target page you can get the "id" value using the
"HttpRequest.QueryString" property.

Alexey Borzenkov (http://alexborzenkov.iespana.es/).
 
Back
Top