daniel50096230
June 8th, 2009, 02:56 AM
basically, I have one datagrid which has InvoiceNo data item. The data item i had put the hyperlink which will navigate the page to another page when InvoiceNo is being clicked. But how can I bring the selected InvoiceNo to another page too?
<asp:datagrid id="ARGrid" runat="server" Width="100%" PagerStyle-Mode="NumericPages" PagerStyle-HorizontalAlign="Center" AllowPaging="True" AllowSorting="True" Font-Size="Smaller" Font-Names="Verdana" AutoGenerateColumns="False" CellPadding="4" PageSize="25" ForeColor="#333333" GridLines="None" >
<HeaderStyle CssClass="gridHeader" BackColor="#507CD1" Font-Bold="True" ForeColor="White" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></HeaderStyle>
<Columns>
<asp:TemplateColumn HeaderText="AR Invoice Number" SortExpression="Trn_Invt.InvoiceNo" >
<HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" CssClass="gridHeaderSortASC"/>
<ItemStyle Width="130px" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ItemStyle>
<ItemTemplate>
<asp:HyperLink id="ViewHyperLink" runat="server" text='<%# container.dataitem("InvoiceNo") %>' cssclass="databaseListAction" NavigateUrl="~/Transaction/ArInvoice.aspx" >
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
At the hyperlink there, it will display ARInvoice.aspx when the invoiceNo was clicked, but what should I do so that I can know which invoiceNo is clicked and i would like to store the invoiceNo using Session and bring it to another page?
<asp:datagrid id="ARGrid" runat="server" Width="100%" PagerStyle-Mode="NumericPages" PagerStyle-HorizontalAlign="Center" AllowPaging="True" AllowSorting="True" Font-Size="Smaller" Font-Names="Verdana" AutoGenerateColumns="False" CellPadding="4" PageSize="25" ForeColor="#333333" GridLines="None" >
<HeaderStyle CssClass="gridHeader" BackColor="#507CD1" Font-Bold="True" ForeColor="White" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></HeaderStyle>
<Columns>
<asp:TemplateColumn HeaderText="AR Invoice Number" SortExpression="Trn_Invt.InvoiceNo" >
<HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" CssClass="gridHeaderSortASC"/>
<ItemStyle Width="130px" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ItemStyle>
<ItemTemplate>
<asp:HyperLink id="ViewHyperLink" runat="server" text='<%# container.dataitem("InvoiceNo") %>' cssclass="databaseListAction" NavigateUrl="~/Transaction/ArInvoice.aspx" >
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
At the hyperlink there, it will display ARInvoice.aspx when the invoiceNo was clicked, but what should I do so that I can know which invoiceNo is clicked and i would like to store the invoiceNo using Session and bring it to another page?