Passing data to aspx page from htm page via iframe

Discussion in 'ASP .Net' started by moondaddy, Sep 12, 2007.

  1. moondaddy

    moondaddy Guest

    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.
    --
    am
    moondaddy, Sep 12, 2007
    #1
    1. Advertising

  2. On Sep 12, 9:04 am, "moondaddy" <> wrote:
    > 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?
    Alexey Smirnov, Sep 12, 2007
    #2
    1. Advertising

  3. 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 <>
    >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" <> wrote:
    >> 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], Sep 12, 2007
    #3
  4. moondaddy

    moondaddy Guest

    Thanks Steven.

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

    "Steven Cheng[MSFT]" <> wrote in message
    news:...
    > 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 <>
    >>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" <> wrote:
    >>> 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?
    >>
    >>

    >
    moondaddy, Sep 12, 2007
    #4
  5. 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" <>
    >References: <>

    <>
    <>
    >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]" <> wrote in message
    >news:...
    >> 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 <>
    >>>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" <> wrote:
    >>>> 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], Sep 13, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?WWF6ZWVkX1JvdW1lcg==?=

    passing data between iframe and the parent aspx page

    =?Utf-8?B?WWF6ZWVkX1JvdW1lcg==?=, Feb 3, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    10,573
    Robbe Morris
    Feb 4, 2005
  2. Jason Honn
    Replies:
    3
    Views:
    3,198
    Teemu Keiski
    Apr 4, 2005
  3. Greg
    Replies:
    4
    Views:
    1,977
  4. Daedalous
    Replies:
    3
    Views:
    651
    Daedalous
    Jan 16, 2004
  5. Replies:
    6
    Views:
    149
    Dr.Ruud
    Feb 6, 2007
Loading...

Share This Page