FrameSet, Access another page's method from server?

Discussion in 'ASP .Net' started by terry, Aug 12, 2003.

  1. terry

    terry Guest

    Hi,
    I am using a FrameSet with three frames. In server code
    (c# code behind) is it possible for a page to call a
    function in another page of the frameset? I suspect that
    it is not possible but it sure would be nice.

    Thanks for your help,
    Terry
     
    terry, Aug 12, 2003
    #1
    1. Advertisements

  2. You can call a client side javascript function in one frame from a client
    side javascript function in another frame.
    If you're talking about server side code then you're out of luck.
     
    Steve C. Orr, MCSD, Aug 12, 2003
    #2
    1. Advertisements

  3. Hello Terry,

    Thanks for posting in the group.

    Steve is right here. If we are calling client side script, surely we could achieve it. But if we call server side code, then it is not
    possible. Since each page instance is created when IIS received a http request. It is not possible for us to call function of
    another page since we couldn't get its instance.

    However, you may try to make the function as a static function. For an example:
    public static void testFunc()
    {
    int i = 1;
    }

    I tested it on my side and it works. Every page could call this static functin by using:
    Webform1.testFunc();

    Hope that helps.

    Best regards,
    Yanhong Huang
    Microsoft Online Partner Support

    Get Secure! - www.microsoft.com/security
    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    !Content-Class: urn:content-classes:message
    !From: "terry" <>
    !Sender: "terry" <>
    !Subject: FrameSet, Access another page's method from server?
    !Date: Tue, 12 Aug 2003 15:09:38 -0700
    !Lines: 8
    !Message-ID: <055a01c3611e$6bcc4c50$>
    !MIME-Version: 1.0
    !Content-Type: text/plain;
    ! charset="iso-8859-1"
    !Content-Transfer-Encoding: 7bit
    !X-Newsreader: Microsoft CDO for Windows 2000
    !X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    !Thread-Index: AcNhHmvMQ83jw9OuRqyRDKckQJkysw==
    !Newsgroups: microsoft.public.dotnet.framework.aspnet
    !Path: cpmsftngxa06.phx.gbl
    !Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:167255
    !NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
    !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    !
    !Hi,
    !I am using a FrameSet with three frames. In server code
    !(c# code behind) is it possible for a page to call a
    !function in another page of the frameset? I suspect that
    !it is not possible but it sure would be nice.
    !
    !Thanks for your help,
    !Terry
    !
     
    Yan-Hong Huang[MSFT], Aug 13, 2003
    #3
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.