parameter loading

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tomjones

    #1

    parameter loading

    My first page of the asp.net project is a html page that has frame and
    for some reason I am unable to get the parameter that is being sent in
    via the url.

    The link that I have defined in my project as start url is:



    Then in the index.htm page I have the following line that references
    the page to load for a frame:

    <frame name="banner"
    src="top.aspx?s tore="'<%=reque st.param("store ")%>' scrolling="no"
    noresize>

    Then in my code behind for top.aspx I have the following which always
    returns 'sn' as an empty string:

    Dim sn As String = Request.Params. Get("store")
    Label1.Text = "Store Information (Store #" + sn + ")"

    If I change the frame scr to be as follows, then it works fine.
    <frame name="banner" src="top.aspx?s tore=5000" scrolling="no"
    noresize>

    I have tried every variation of request.* that I could think of but
    nothing seems to work.

    Anyone have any suggestions?

    Thanks.
  • Roy Osherove

    #2
    Re: parameter loading

    On 25 Nov 2003 13:14:30 -0800, tomjones wrote:
    [color=blue]
    > My first page of the asp.net project is a html page that has frame and
    > for some reason I am unable to get the parameter that is being sent in
    > via the url.
    >
    > The link that I have defined in my project as start url is:
    >
    > http://localhost/MDN0100/index.htm?store=5000
    >
    > Then in the index.htm page I have the following line that references
    > the page to load for a frame:
    >
    > <frame name="banner"
    > src="top.aspx?s tore="'<%=reque st.param("store ")%>' scrolling="no"
    > noresize>
    >
    > Then in my code behind for top.aspx I have the following which always
    > returns 'sn' as an empty string:
    >
    > Dim sn As String = Request.Params. Get("store")
    > Label1.Text = "Store Information (Store #" + sn + ")"
    >
    > If I change the frame scr to be as follows, then it works fine.
    > <frame name="banner" src="top.aspx?s tore=5000" scrolling="no"
    > noresize>
    >
    > I have tried every variation of request.* that I could think of but
    > nothing seems to work.
    >
    > Anyone have any suggestions?
    >
    > Thanks.[/color]

    Just use Request("paramN ame")
    BTW - you wrote Request.Param and nor Request.Params maybe that's your
    problem
    --
    Roy Osherove
    weblog: http://www.iserializable.com

    Comment

    Working...