Passing in a parameter

Discussion in 'ASP .Net Building Controls' started by Jon, Dec 1, 2004.

  1. Jon

    Jon Guest

    Hello All,

    I've declared my usercontrol in the normal way (page directive) and to load
    it I'm doing: <webapp:menu runat="server" />. However, is there a way I can
    pass a parameter into it as this menu will be used on a number of pages and
    on each page it needs to show the same info, but with a different css applied
    so i need to know what page i'm on.

    Any other ideas would be appreciated also,

    Thanks,

    Jon
     
    Jon, Dec 1, 2004
    #1
    1. Advertising

  2. Jon

    pete Guest

    Couldn't you specify a public property on the user control which you could
    use to indicate the css file to use?

    Pete

    "Jon" <> wrote in message
    news:...
    > Hello All,
    >
    > I've declared my usercontrol in the normal way (page directive) and to

    load
    > it I'm doing: <webapp:menu runat="server" />. However, is there a way I

    can
    > pass a parameter into it as this menu will be used on a number of pages

    and
    > on each page it needs to show the same info, but with a different css

    applied
    > so i need to know what page i'm on.
    >
    > Any other ideas would be appreciated also,
    >
    > Thanks,
    >
    > Jon
    >
     
    pete, Dec 4, 2004
    #2
    1. Advertising

  3. Jon

    G Rupe Guest

    Look at

    http://www.123aspx.com/ResErr.aspx?res=937

    It explains it well


    "Jon" wrote:

    > Hello All,
    >
    > I've declared my usercontrol in the normal way (page directive) and to load
    > it I'm doing: <webapp:menu runat="server" />. However, is there a way I can
    > pass a parameter into it as this menu will be used on a number of pages and
    > on each page it needs to show the same info, but with a different css applied
    > so i need to know what page i'm on.
    >
    > Any other ideas would be appreciated also,
    >
    > Thanks,
    >
    > Jon
    >
     
    G Rupe, Feb 9, 2005
    #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. Replies:
    4
    Views:
    536
    Matteo
    Mar 29, 2007
  2. Stuart Redmann
    Replies:
    5
    Views:
    496
    Stuart Redmann
    Dec 14, 2007
  3. Replies:
    5
    Views:
    651
  4. Isti
    Replies:
    2
    Views:
    737
  5. Mister B
    Replies:
    8
    Views:
    572
    Nick Keighley
    Aug 26, 2010
Loading...

Share This Page