I am trying to pass a variable between two web pages, and this doesn't work consistently. I have the following code in my main page:
and this is what I have on the receiving page:
This is supposed to just pass the parameters to the web resulting web page, which then sends those values to a sql stored procedure. I've tried sending this in a string to that page, and it works part of the time and not on other times. What am I doing wrong?
Code:
<asp:TemplateField HeaderText="Firstlisting" SortExpression="Firstlisting"> <ItemTemplate> <asp:HyperLink ID="Firstlisting" runat="server" Text='<%# Eval("Firstlisting") %>' NavigateUrl='<%# String.Format("\website1\Default3.aspx?firstlisting={0}", Eval("Firstlisting")) %>' /> </ItemTemplate> </asp:TemplateField>
Code:
<SelectParameters> <asp:QueryStringParameter Name="firstlisting" QueryStringField="firstlisting" Type="String" /> </SelectParameters>