communication between to pages in app

Discussion in 'ASP .Net' started by eggie5, Aug 1, 2007.

  1. eggie5

    eggie5 Guest

    I have two pages in my asp.net application: default.aspx.cs and
    test.aspx.cs. How can I call methods from test.aspx.cs from
    default.aspx.cs. I can't seem to be able to do this. The aspx.cs files
    dont seem to be part of a namespace or anything. How can I do this?
    eggie5, Aug 1, 2007
    #1
    1. Advertising

  2. eggie5

    Patrice Guest

    If you call code from multiple pages I would put this in a separate class.
    Add a new class that will be added to app_code to clearly denote its wide
    scope.

    Another option would be perhaps to instantiate the page (or expose this as a
    shared member if you don't need the page to be instantiated, the namespace
    is ASP, use the boject browser to locate what you need) but once again it
    doesn't really make sense IMO from an architectural point of view...
    --
    Patrice

    "eggie5" <> a écrit dans le message de news:
    ...
    >I have two pages in my asp.net application: default.aspx.cs and
    > test.aspx.cs. How can I call methods from test.aspx.cs from
    > default.aspx.cs. I can't seem to be able to do this. The aspx.cs files
    > dont seem to be part of a namespace or anything. How can I do this?
    >
    Patrice, Aug 1, 2007
    #2
    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. Leo Duran

    Communication between web pages

    Leo Duran, Oct 23, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    5,849
  2. fooooo
    Replies:
    5
    Views:
    883
    Paul Rubin
    May 3, 2005
  3. Jp Calderone
    Replies:
    1
    Views:
    1,336
    Paul Rubin
    May 24, 2005
  4. =?Utf-8?B?U2VraGFy?=
    Replies:
    3
    Views:
    363
    =?Utf-8?B?U2VraGFy?=
    Jul 10, 2007
  5. kenk
    Replies:
    4
    Views:
    696
    premiumtelco
    Mar 23, 2013
Loading...

Share This Page