passing variables from aspx page to ascx control

Discussion in 'ASP .Net' started by darrel, May 20, 2004.

  1. darrel

    darrel Guest

    Is there a SOP for setting variables on an ASPX page that the usercontrols
    on that page can read?

    I'd like to set a 'template=' variable that various other controls can see
    (the
    header, navigation, footer, etc.).

    Would simply setting a public variable be enough?

    -Darrel
     
    darrel, May 20, 2004
    #1
    1. Advertising

  2. Yes, it is enough if you have public properties in the aspx page, you can
    access those values using "Page" property of user control. Even you can
    access all the controls in that page using this property.

    --
    Saravana
    Microsoft MVP - ASP.NET
    www.extremeexperts.com



    "darrel" <> wrote in message
    news:...
    > Is there a SOP for setting variables on an ASPX page that the usercontrols
    > on that page can read?
    >
    > I'd like to set a 'template=' variable that various other controls can see
    > (the
    > header, navigation, footer, etc.).
    >
    > Would simply setting a public variable be enough?
    >
    > -Darrel
    >
    >
    >
     
    Saravana [MVP], May 21, 2004
    #2
    1. Advertising

  3. darrel

    darrel Guest

    > Yes, it is enough if you have public properties in the aspx page, you can
    > access those values using "Page" property of user control.


    Thanks, Saravana!

    -Darrel
     
    darrel, May 21, 2004
    #3
    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. David Freeman
    Replies:
    4
    Views:
    3,435
    David Freeman
    Nov 9, 2004
  2. KatB
    Replies:
    0
    Views:
    622
  3. Fernando Chilvarguer

    Passing variables from ASPX page to ASCX control

    Fernando Chilvarguer, Aug 31, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    11,597
    Fernando Chilvarguer
    Sep 1, 2006
  4. David Freeman
    Replies:
    4
    Views:
    222
    David Freeman
    Nov 9, 2004
  5. RadioSignal

    passing variables from .aspx.cs code pages to .aspx pages

    RadioSignal, Sep 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    7
    Views:
    2,390
    Mirronelli
    Oct 22, 2005
Loading...

Share This Page