Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Passing data to aspx page from htm page via iframe

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
moondaddy - 12 Sep 2007 08:04 GMT
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.
Signature

moondaddy@newsgroup.nospam

Alexey Smirnov - 12 Sep 2007 09:24 GMT
> 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?
Steven Cheng[MSFT] - 12 Sep 2007 11:22 GMT
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/forums/t84424-iframe-url-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/source_code/javascript/client_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 <alexey.smirnov@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

>> 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
[quoted text clipped - 3 lines]
>
>What about AJAX?
moondaddy - 12 Sep 2007 15:36 GMT
Thanks Steven.

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

> Thanks for Alexey's input.
>
[quoted text clipped - 50 lines]
>>
>>What about AJAX?
Steven Cheng[MSFT] - 13 Sep 2007 03:38 GMT
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" <moondaddy@newsgroup.nospam>
>References: <eUkIdrQ9HHA.5840@TK2MSFTNGP03.phx.gbl>
<1189585445.466207.249700@k79g2000hse.googlegroups.com>
<456agbS9HHA.5604@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.
>
[quoted text clipped - 20 lines]
>>
>> #Client Side Include DEMO - Using JavaScript / XMLHTTP

http://www.jmaguire.com/downloads/source_code/javascript/client_side_include
>> /
>>
[quoted text clipped - 29 lines]
>>>
>>>What about AJAX?

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.