• 1.2k
  • 232
  • 1.2k

Pass variable to another page

Apr 15 2024 9:52 AM

ok so i have a page with a gridview on it and it displays rows from sql table. i have also a link assigned to each row:

<asp:GridView ID="GridViewMatters" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridViewMatters_RowDataBound">
        <asp:BoundField DataField="client_ref" HeaderText="Client Reference" />
        <asp:BoundField DataField="our_ref" HeaderText="Our Reference" />
        <asp:BoundField DataField="client_name" HeaderText="First Name" />
        <asp:BoundField DataField="section_name" HeaderText="Second Name" />
        <asp:BoundField DataField="curr_status" HeaderText="Status" />
        <asp:TemplateField HeaderText="">
                <asp:HyperLink ID="lnkDetails" runat="server" Text="View" NavigateUrl='<%# Eval("our_ref", "MD_Overall.aspx?id={0}") %>' />

this works fine and the url that gets displayed is good. But i would like to send the our_ref attribute to the page itself aswell as the url and use it make further queries.




Answers (3)