Request.QueryString Problem

Discussion in 'ASP .Net' started by franklinbruce, Jan 12, 2005.

  1. Hi all,
    I am passing a value from Javascript to a IFrame. when i tired to
    acces that value like request.querystring("id1") it says "name id1 is
    not declared"


    code as follow:
    ---------------

    javascript code:

    function pass_iframe()
    {
    myval = document.Form1.name1[document.Form1.name1.selectedIndex].value
    document.frame2.location.href="new_patient_personal.aspx?id1="
    +myval;
    }

    Asp.net(Code behind is VB.net) code:

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load
    Request.QueryString("id1")
    End Sub


    Thanks in advance
    Regards
    Frank
     
    franklinbruce, Jan 12, 2005
    #1
    1. Advertising

  2. My first guess would be that you've left the myval variable empty on
    accident.
    Are you sure the querystring is being posted that you thing is being posted?

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "franklinbruce" <> wrote in message
    news:...
    > Hi all,
    > I am passing a value from Javascript to a IFrame. when i tired to
    > acces that value like request.querystring("id1") it says "name id1 is
    > not declared"
    >
    >
    > code as follow:
    > ---------------
    >
    > javascript code:
    >
    > function pass_iframe()
    > {
    > myval = document.Form1.name1[document.Form1.name1.selectedIndex].value
    > document.frame2.location.href="new_patient_personal.aspx?id1="
    > +myval;
    > }
    >
    > Asp.net(Code behind is VB.net) code:
    >
    > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    > System.EventArgs) Handles MyBase.Load
    > Request.QueryString("id1")
    > End Sub
    >
    >
    > Thanks in advance
    > Regards
    > Frank
     
    Steve C. Orr [MVP, MCSD], Jan 12, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Daniel Bass
    Replies:
    2
    Views:
    3,718
    dave wanta
    Jul 4, 2003
  2. George
    Replies:
    5
    Views:
    6,622
    George
    Apr 2, 2004
  3. michaaal
    Replies:
    6
    Views:
    413
    Michael D. Kersey
    Jul 15, 2003
  4. John Davis
    Replies:
    2
    Views:
    397
    Dave Anderson
    Aug 18, 2003
  5. Ivan
    Replies:
    5
    Views:
    159
Loading...

Share This Page