473,473 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to load iframe in page?

24 New Member
Hi
I have page LotteryResultPage.aspx .
And i have one control which has two drop down and value is like this
<option value="SelectStates">Select a Country</option>
<option value="3">US,Canada,U.K.& Ireland </option>
<option value="8">Mexico</option>

control has GO button,and it has javascript function, when clicked the button js function passes the parameter value like this LotteryResultPage.aspx?country=3

I need to load two iframe. but when country value is 3 than load
one iframe src is iframe/lottery_results.html
and when country value is 8 load
another iframe src is iframe/lottery2.html in the LotteryResultPage.aspx

thanks
can anyone help me?




I
Jan 19 '08 #1
2 1189
kenobewan
4,871 Recognized Expert Specialist
Expand|Select|Wrap|Line Numbers
  1. Dim country as integer = Request.QueryString["country"] 
  2. Dim frame1 As HtmlControl = CType(Me.FindControl("frame1"), HtmlControl)
  3. if country = 3 then
  4.    frame1.Attributes("src") = "iframe/lottery_results.html"
  5. else if country = 8 then
  6.    frame1.Attributes("src") = "iframe/lottery2.html" 
  7. else
  8.    label.text= "This is a secure page, please click the back button and pretend you never saw it"
  9. end if
Jan 19 '08 #2
pratimapaudel
24 New Member
Thanks for your code.
Was useful.
Jan 20 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Paul | last post by:
HI! how do we load a page from the menu into an iframe when you are not on the iframe page? I want to be able to load pages (options in my menu ) into a iframe no matter if I am on the iframe...
5
by: jim.frantzen | last post by:
You have an active XMLHTTP request on the main page (localhost/App1/index.aspx) The XMLHTTP request takes about 60 seconds to receive a response back from localhost/App1/getxml.aspx. You have an...
2
by: Les Juby | last post by:
Hi A clint has insisted we load a babbling brook sound clip to his home page but it needs to load last to avoid delays in loading images and other elements. Simply declaring it at page bottom...
5
by: SigRob | last post by:
I have PAGE1 with the link to PAGE2 with iframe. (iframe load several naked html). I want to add directive to the link to point sprcific content of iframe. to make it clear link on PAGE1 ->...
2
by: bhosle | last post by:
hi ppl.. i'm new to jsp and iframes.. and here is what i want to do - take input from the user in a form, and load an iframe with that url.. any suggestions? thx.. AB
2
by: hgl1976 | last post by:
Hi! I have a web page that from a query that loads the search result into an iframe on the page. In the search result inside the iframe i would like to be able to load content into div tag that...
4
by: eyalrab | last post by:
I am trying to load page into iframe in IE7 and change the page bgColor after the page has loaded. I tried 2 options: 1. Change the iframe.src from the parent to the new URL. 2. Write div...
0
Fuhrer
by: Fuhrer | last post by:
Hi all, i have a web page(.aspx) and i have a button and an iFrame in it. What i'm trying to do is: when i click this button i want that an rpt file load into the iFrame. what i'm doing now is...
5
by: BerlinBrown | last post by:
Do you know if it is possible to wait for the iframe page to load and then manipulate the iframe DOM. E.g. mypage: <script> function myinit() { theiframe.location = "iframe_with_frames.html"...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.