passing variables between pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dougancil
    Contributor
    • Apr 2010
    • 347

    passing variables between pages

    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:

    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>
    and this is what I have on the receiving page:
    Code:
       <SelectParameters>
        <asp:QueryStringParameter Name="firstlisting" QueryStringField="firstlisting" 
                        Type="String" />
                </SelectParameters>
    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?
Working...