How do I pass a QueryString value to an iFrame?

Hi Team-

I could use some help here.  I have a classic ASP page that uses a iFrame.  The iFrame loads an ASP.NET page on another server.  

When my classic ASP page loads there's a QueryString value I need for my IFrame page to load correctly.

How do I pass a QueryString value to my iFrame so my ASPX page can read the value?

So here an example of my Classic ASP page URL:

Here's my iframe in my Classic ASP page:

<iframe id="myIframe" src="" width="100%" frameborder="0">

Open in new window

Here's my code behind on my IntakeUpload.aspx page (The page that's getting loaded into my iFrame)

    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load

        Dim intIntakeID As Nullable(Of Integer) = CInt(Request.QueryString("intakeID"))

        If intIntakeID.HasValue Then
            lbIntakeID.Text = "No Intake ID found"
            lbIntakeID.Text = intIntakeID.ToString
        End If

    End Sub

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Big MontyWeb Ninja at largeCommented:
try this:

<iframe id="myIframe" src="<%=Request.QueryString("intakeID")%>" width="100%" frameborder="0">

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Paul MacDonaldDirector, Information SystemsCommented:
[Big Monty]'s example pulls the parent page AS the iframe, and I don't think that's right.  You need to pull the iframe, but call the querystring from the parent.

<iframe id="myIframe" src="<%=Request.QueryString("intakeID")%>" width="100%" frameborder="0">

cdemott33Author Commented:
Thank you.  This worked!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.