troubleshooting Question

How do I pass a QueryString value to an iFrame?

Avatar of cdemott33
cdemott33Flag for United States of America asked on
ASPASP.NETWeb Development
3 Comments1 Solution382 ViewsLast Modified:
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">

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
Big Monty
Web Ninja at large

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros