473,320 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Obtaining an iFrame src in ASP.NET

Hi,

The current scenario is that I have an iframe inside an asp.net web
page where I periodically check the url inside the iFrame. I know that
all this information can be obtained in the client-side during a page
load.
Does anyone know an efficient way to obtain the current url of the src
attribute of the iFrame? Or if there is a better solution?

Many thanks

Jul 27 '07 #1
6 2605
Are you trying to do this on the client or server side?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<ho*****@googlemail.comwrote in message
news:11**********************@o61g2000hsh.googlegr oups.com...
Hi,

The current scenario is that I have an iframe inside an asp.net web
page where I periodically check the url inside the iFrame. I know that
all this information can be obtained in the client-side during a page
load.
Does anyone know an efficient way to obtain the current url of the src
attribute of the iFrame? Or if there is a better solution?

Many thanks

Jul 27 '07 #2
I have tried on the server side, but to no prevail, aand not sure how
to go abouts for the client side.

On Jul 27, 3:48 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Are you trying to do this on the client or server side?

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com

<hong...@googlemail.comwrote in message

news:11**********************@o61g2000hsh.googlegr oups.com...
Hi,
The current scenario is that I have an iframe inside an asp.net web
page where I periodically check the url inside the iFrame. I know that
all this information can be obtained in the client-side during a page
load.
Does anyone know an efficient way to obtain the current url of the src
attribute of the iFrame? Or if there is a better solution?
Many thanks- Hide quoted text -

- Show quoted text -

Jul 27 '07 #3
Well, what exactly are you trying to do? On the client side, you would
use javascript to access it. You just have to know the id of the IFrame
element and you can proceed from there.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<ho*****@googlemail.comwrote in message
news:11*********************@19g2000hsx.googlegrou ps.com...
>I have tried on the server side, but to no prevail, aand not sure how
to go abouts for the client side.

On Jul 27, 3:48 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
> Are you trying to do this on the client or server side?

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com

<hong...@googlemail.comwrote in message

news:11**********************@o61g2000hsh.googleg roups.com...
Hi,
The current scenario is that I have an iframe inside an asp.net web
page where I periodically check the url inside the iFrame. I know that
all this information can be obtained in the client-side during a page
load.
Does anyone know an efficient way to obtain the current url of the src
attribute of the iFrame? Or if there is a better solution?
Many thanks- Hide quoted text -

- Show quoted text -


Jul 27 '07 #4
Even when you declare a new HtmlControl frame inside a frameholder,
obviously you can set the src attribute to a url. But when you run a
timer, on the HtmlControl object is NULL so there is no way you can
access anything from the server-side.

On Jul 27, 4:27 pm, "hong...@googlemail.com" <hong...@googlemail.com>
wrote:
I have tried on the server side, but to no prevail, aand not sure how
to go abouts for the client side.

On Jul 27, 3:48 pm, "Nicholas Paldino [.NET/C# MVP]"

<m...@spam.guard.caspershouse.comwrote:
Are you trying to do this on the client or server side?
--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com
<hong...@googlemail.comwrote in message
news:11**********************@o61g2000hsh.googlegr oups.com...
Hi,
The current scenario is that I have an iframe inside an asp.net web
page where I periodically check the url inside the iFrame. I know that
all this information can be obtained in the client-side during a page
load.
Does anyone know an efficient way to obtain the current url of the src
attribute of the iFrame? Or if there is a better solution?
Many thanks- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -

Jul 27 '07 #5
How would you be able to access the src element of the iframe using
javascript and store this in a string in c#?

On Jul 27, 4:35 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Well, what exactly are you trying to do? On the client side, you would
use javascript to access it. You just have to know the id of the IFrame
element and you can proceed from there.

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com

<hong...@googlemail.comwrote in message

news:11*********************@19g2000hsx.googlegrou ps.com...
I have tried on the server side, but to no prevail, aand not sure how
to go abouts for the client side.
On Jul 27, 3:48 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Are you trying to do this on the client or server side?
--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com
<hong...@googlemail.comwrote in message
>news:11**********************@o61g2000hsh.googleg roups.com...
Hi,
The current scenario is that I have an iframe inside an asp.net web
page where I periodically check the url inside the iFrame. I know that
all this information can be obtained in the client-side during a page
load.
Does anyone know an efficient way to obtain the current url of the src
attribute of the iFrame? Or if there is a better solution?
Many thanks- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -

Jul 27 '07 #6
Is there a way of obtaining the URL of the src element when requested,
is there a need for Page.RegisterStartupScript? Because when running a
timer which makes use of a static method, you won't be able to use
Page.RegisterStartupScript which you can run the javascript code?

On Jul 27, 4:49 pm, "hong...@googlemail.com" <hong...@googlemail.com>
wrote:
How would you be able to access the src element of the iframe using
javascript and store this in a string in c#?

On Jul 27, 4:35 pm, "Nicholas Paldino [.NET/C# MVP]"

<m...@spam.guard.caspershouse.comwrote:
Well, what exactly are you trying to do? On the client side, you would
use javascript to access it. You just have to know the id of the IFrame
element and you can proceed from there.
--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com
<hong...@googlemail.comwrote in message
news:11*********************@19g2000hsx.googlegrou ps.com...
>I have tried on the server side, but to no prevail, aand not sure how
to go abouts for the client side.
On Jul 27, 3:48 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
> Are you trying to do this on the client or server side?
>--
> - Nicholas Paldino [.NET/C# MVP]
> - m...@spam.guard.caspershouse.com
><hong...@googlemail.comwrote in message
>>news:11**********************@o61g2000hsh.google groups.com...
Hi,
The current scenario is that I have an iframe inside an asp.net web
page where I periodically check the url inside the iFrame. I know that
all this information can be obtained in the client-side during a page
load.
Does anyone know an efficient way to obtain the current url of the src
attribute of the iFrame? Or if there is a better solution?
Many thanks- Hide quoted text -
>- Show quoted text -- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -

Jul 27 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Thomas | last post by:
Hi there, I have an iframe which is editable (designMode = "on") and want to resize it dynamically as the content grows (e.g. more lines of text is in there) and there the struggle starts. I...
2
by: Templar | last post by:
Hi i'm bothering with such problem... I must dynamic create an Iframe, and then put som raw HTML into it. But I can't. When I create iframe, I can't access its properties. Here's the coe...
3
by: hendedav | last post by:
Hi gang. As with any other post, I am working on a project and have gotten stuck. I am trying to obtain a variable value in the parent webpage from an <iframe>. For instance: Parent Page code...
7
by: Christopher J. Hahn | last post by:
I'm trying to use a script-generated form to submit to a script-generated iframe. The problem I'm running into is that the iframe is not assuming the name I assign it. IE6 on Win2000. FF1.0.2+...
3
by: Wade | last post by:
08242005 1416 GMT-5 Recently some of you helped me with a script to change images. Well I was asked to make a change to the script and not knowing if what the school system is even possible, Ill...
3
by: Biff | last post by:
Hello, I am bringing up an iFrame with a calendar control in it in coordination with a text box that holds a date field. In my code behind class I add a method call to the text box's OnFocus...
1
by: yashgt | last post by:
My HTML is shown in an iframe. There is a link in the HTML that needs the ID of the iframe to be used in the onclick event. How do I get it? I tried accessing the target property, but it turns out...
0
by: tequilamala | last post by:
I have an Iframe in one of the pages i am developing... the iframe is suppose to scroll up and down and the links target the iframe. the problem is that the iframe scrolls side to side on internet...
1
by: Z1P2 | last post by:
I would like to gradually resize an iframe in an onmouseover event. I can easily do it with an image, but when I try to do it with an iframe, it doesn't do anything. So first of all, is it possible...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.