I have a datagrid with hyperlink columns on my page Fill.aspx. I
allow users to click on any column in a row. This triggers a lookup
using the order#(SubON) which fills in various text boxes with further
information. Right now my code looks like this:
<asp:datagrid id="dgdList" style="Z-INDEX: 107; LEFT: 0px; POSITION:
absolute; TOP: 0px" runat="server"Font-Names="Arial"
Font-Size="Smaller" Width="480px" Height="136px"
AutoGenerateColumns="False">
<SelectedItemStyle BackColor="PowderBlue"></SelectedItemStyle>
<AlternatingItemStyle BackColor="#FFE0C0"></AlternatingItemStyle>
<HeaderStyle Font-Size="X-Small" Font-Names="Arial" Font-Bold="True"
BackColor="Orange"></HeaderStyle>
<Columns>
<asp:HyperLinkColumnDataNavigateUrlField="SubON"DataNavigateUrlFormatString="Fill.aspx?SubON={0}"DataTextField="SubON"HeaderText="Order
#"> </asp:HyperLinkColumn>
<asp:HyperLinkColumnDataNavigateUrlField="SubON"DataNavigateUrlFormatString="Fill.aspx?SubON={0}"
DataTextField="Block"HeaderText="Block"></asp:HyperLinkColumn>
<asp:HyperLinkColumnDataNavigateUrlField="SubON"DataNavigateUrlFormatString="Fill.aspx?SubON={0}"
DataTextField="Quantity"HeaderText="Quantity">
</asp:HyperLinkColumn>
<asp:HyperLinkColumnDataNavigateUrlField="SubON"DataNavigateUrlFormatString="Fill.aspx?SubON={0}"
DataTextField="NPA"HeaderText="NPA"></asp:HyperLinkColumn>
<asp:HyperLinkColumnDataNavigateUrlField="SubON"DataNavigateUrlFormatString="Fill.aspx?SubON={0}"
DataTextField="RC"HeaderText="RC"></asp:HyperLinkColumn>
<asp:HyperLinkColumnDataNavigateUrlField="SubON"DataNavigateUrlFormatString="Fill.aspx?SubON={0}"
DataTextField="RDate"HeaderText="Date"></asp:HyperLinkColumn>
</Columns>
</asp:datagrid>
What I need to do is carry another variable as well. Since I'm
reloading the page: DataNavigateUrlFormatString="Fill.aspx?SubON={0}"
I loose the variable on the page where I'm holding it in an invisible
text box.
So, I need a variable which I've been carrying by url string for
several pages as well as the SubOn variable. I've tried adding to the
UrlFormatString, but I don't know how to do so properly if it can be
done. Another option would be to use postback instead of loading the
page again (I think) but I can't figure out how to do that either.
Can anyone help?