J
Jason
On a Datagrid defined as
<asp:datagrid id="dgCountries" width="100%" AutoGenerateColumns="False"
Runat="server" CellSpacing="1" BorderWidth="0px" CellPadding="2"
DataKeyField="code">
<Columns>
<asp:BoundColumn DataField="Code"
HeaderText="Code"></asp:BoundColumn>
<asp:TemplateColumn>
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.Code",
"somepage.aspx?countryid={0}") %>'>
<img id="StateImage" runat="server"
src="~/APP_Themes/buttons/Regions.gif" border=0 />
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
the hyperlink provides the row clicked via the Query string. We are getting
rid of the querry string and I need to implement this via CrossPagePostback.
So far I can not figure out how to access which row was selected before it
was passed on the querystring. I am able to access the grid but from there I
am stuck.
the hyperlink above will be changed to something like
<asp:Button Runat=server PostbackUrl="somepage" Id="somecontrol">
Any help would be really appreciated.
<asp:datagrid id="dgCountries" width="100%" AutoGenerateColumns="False"
Runat="server" CellSpacing="1" BorderWidth="0px" CellPadding="2"
DataKeyField="code">
<Columns>
<asp:BoundColumn DataField="Code"
HeaderText="Code"></asp:BoundColumn>
<asp:TemplateColumn>
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.Code",
"somepage.aspx?countryid={0}") %>'>
<img id="StateImage" runat="server"
src="~/APP_Themes/buttons/Regions.gif" border=0 />
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
the hyperlink provides the row clicked via the Query string. We are getting
rid of the querry string and I need to implement this via CrossPagePostback.
So far I can not figure out how to access which row was selected before it
was passed on the querystring. I am able to access the grid but from there I
am stuck.
the hyperlink above will be changed to something like
<asp:Button Runat=server PostbackUrl="somepage" Id="somecontrol">
Any help would be really appreciated.