467,925 Members | 1,991 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,925 developers. It's quick & easy.

Passing data to aspx page from htm page via iframe

I have a htm page where I need to pass some data to an aspx page as a means
of sending data to the database. I don't need to see the aspx page so I was
going to put it in a hidden iframe. This works real good. Since I don't
need the aspx page to do any postback, is there a way to pass a parameter to
it with out it finishing the round trip back to the htm page?

Thanks.
--
mo*******@newsgroup.nospam
Sep 12 '07 #1
  • viewed: 3864
Share:
4 Replies
On Sep 12, 9:04 am, "moondaddy" <moonda...@newsgroup.nospamwrote:
I have a htm page where I need to pass some data to an aspx page as a means
of sending data to the database. I don't need to see the aspx page so I was
going to put it in a hidden iframe. This works real good. Since I don't
need the aspx page to do any postback, is there a way to pass a parameter to
it with out it finishing the round trip back to the htm page?
What about AJAX?

Sep 12 '07 #2
Thanks for Alexey's input.

Hi Moondaddy,

Yes, using inner html frame is one means, you can simply reset the Iframe's
url(through "window.location =...... " script statement). Here are some
articles mentioned about the iframe location/url or refresh it through
script:

http://www.quirksmode.org/js/iframe.html

http://www.velocityreviews.com/forum...-changing.html

http://www.thescripts.com/forum/thread468654.html

Or as Alexey mentioned, you can also use AJAX approach(use XMLhttp
component) to send GET request to another page programmatically:

#Client Side Include DEMO - Using JavaScript / XMLHTTP
http://www.jmaguire.com/downloads/so...t_side_include
/

http://www.jibbering.com/2002/4/httprequest.html
In addition, for passing values/parameters, I sugguest you use querystring.
Thus, you can simply append them in url string.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
>From: Alexey Smirnov <al************@gmail.com>
Newsgroups: microsoft.public.dotnet.framework.aspnet
Subject: Re: Passing data to aspx page from htm page via iframe
Date: Wed, 12 Sep 2007 01:24:05 -0700
>
On Sep 12, 9:04 am, "moondaddy" <moonda...@newsgroup.nospamwrote:
>I have a htm page where I need to pass some data to an aspx page as a
means
>of sending data to the database. I don't need to see the aspx page so I
was
>going to put it in a hidden iframe. This works real good. Since I don't
need the aspx page to do any postback, is there a way to pass a
parameter to
>it with out it finishing the round trip back to the htm page?

What about AJAX?

Sep 12 '07 #3
Thanks Steven.

These are some good links and I'll take some time to study them.

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:45**************@TK2MSFTNGHUB02.phx.gbl...
Thanks for Alexey's input.

Hi Moondaddy,

Yes, using inner html frame is one means, you can simply reset the
Iframe's
url(through "window.location =...... " script statement). Here are some
articles mentioned about the iframe location/url or refresh it through
script:

http://www.quirksmode.org/js/iframe.html

http://www.velocityreviews.com/forum...-changing.html

http://www.thescripts.com/forum/thread468654.html

Or as Alexey mentioned, you can also use AJAX approach(use XMLhttp
component) to send GET request to another page programmatically:

#Client Side Include DEMO - Using JavaScript / XMLHTTP
http://www.jmaguire.com/downloads/so...t_side_include
/

http://www.jibbering.com/2002/4/httprequest.html
In addition, for passing values/parameters, I sugguest you use
querystring.
Thus, you can simply append them in url string.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.


--------------------
>>From: Alexey Smirnov <al************@gmail.com>
Newsgroups: microsoft.public.dotnet.framework.aspnet
Subject: Re: Passing data to aspx page from htm page via iframe
Date: Wed, 12 Sep 2007 01:24:05 -0700
>>
On Sep 12, 9:04 am, "moondaddy" <moonda...@newsgroup.nospamwrote:
>>I have a htm page where I need to pass some data to an aspx page as a
means
>>of sending data to the database. I don't need to see the aspx page so I
was
>>going to put it in a hidden iframe. This works real good. Since I don't
need the aspx page to do any postback, is there a way to pass a
parameter to
>>it with out it finishing the round trip back to the htm page?

What about AJAX?


Sep 12 '07 #4
Thanks for your followup Moondaddy,

No problem. If you have any further questions later, welcome to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
>From: "moondaddy" <mo*******@newsgroup.nospam>
References: <eU**************@TK2MSFTNGP03.phx.gbl>
<11**********************@k79g2000hse.googlegroups .com>
<45**************@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: Passing data to aspx page from htm page via iframe
Date: Wed, 12 Sep 2007 09:36:18 -0500
>
Thanks Steven.

These are some good links and I'll take some time to study them.

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:45**************@TK2MSFTNGHUB02.phx.gbl...
>Thanks for Alexey's input.

Hi Moondaddy,

Yes, using inner html frame is one means, you can simply reset the
Iframe's
url(through "window.location =...... " script statement). Here are some
articles mentioned about the iframe location/url or refresh it through
script:

http://www.quirksmode.org/js/iframe.html

http://www.velocityreviews.com/forum...-changing.html

http://www.thescripts.com/forum/thread468654.html

Or as Alexey mentioned, you can also use AJAX approach(use XMLhttp
component) to send GET request to another page programmatically:

#Client Side Include DEMO - Using JavaScript / XMLHTTP
http://www.jmaguire.com/downloads/so...t_side_include
>/

http://www.jibbering.com/2002/4/httprequest.html
In addition, for passing values/parameters, I sugguest you use
querystring.
Thus, you can simply append them in url string.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.


--------------------
>>>From: Alexey Smirnov <al************@gmail.com>
Newsgroups: microsoft.public.dotnet.framework.aspnet
Subject: Re: Passing data to aspx page from htm page via iframe
Date: Wed, 12 Sep 2007 01:24:05 -0700
>>>
On Sep 12, 9:04 am, "moondaddy" <moonda...@newsgroup.nospamwrote:
I have a htm page where I need to pass some data to an aspx page as a
means
>>>of sending data to the database. I don't need to see the aspx page so
I
>was
>>>going to put it in a hidden iframe. This works real good. Since I
don't
>>>need the aspx page to do any postback, is there a way to pass a
parameter to
>>>it with out it finishing the round trip back to the htm page?

What about AJAX?



Sep 13 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Noozer | last post: by
1 post views Thread by Jan Van Steenbergen | last post: by
2 posts views Thread by Yazeed_Roumer | last post: by
1 post views Thread by Ryan Ternier | last post: by
6 posts views Thread by John Kotuby | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.