Results 1 to 3 of 3

Thread: How to call postback of a frame

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2002
    Location
    London
    Posts
    63

    How to call postback of a frame

    Hi,

    I have a page with a frame.

    I want to be able to call a postback of the page within the frame by clicking on a button on the outer page.

    How can I do this, is it possible through the .NET side, or is there a javascript way?

    Basically my page is a wizard with a next, previous and finish button, and when a user clicks the next button I want to be able to call a function in the frame page in order to save its fields to session state, so that if the user clicks previous and comes back to that page then I can retreive the info.

    I've got the function to save a retreive the info to session state sorted out. I just need a way of calling it from the outer frame before it moves on to the next page in the wizard.

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    I had a similar situation where I needed to call a postback from another frame. The way I did it was to add another button on the frame you wanted to call. Then from the calling frame you can call __doPostBack which will be added automatically. So from the calling frame do something like:

    parent.frames.NameOfThePostbackFrame.__doPostBack('btnYourButton', '')
    Last edited by Serge; Aug 6th, 2004 at 02:50 PM.

  3. #3
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Re: How to call postback of a frame

    I took the hidden button to the next level and made a special no display area control for this. I've had to do stuff like this quite a few times and finally made this http://vbforums.com/showthread.php?t=329597
    Magiaus

    If I helped give me some points.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width