Registering controls in masterpage and use them in pages?

Last post 05-19-2005 4:56 AM by MRTotus. 2 replies.

Sort Posts:

  • Registering controls in masterpage and use them in pages?

    05-18-2005, 12:54 PM
    • Member
      405 point Member
    • MRTotus
    • Member since 03-18-2005, 2:58 PM
    • Poland
    • Posts 81
    Can one somehow place the register tags of ascx controls in *.master file and use those controls in page (*.aspx) files using that master page?
    [putting register tags of a control in masterpage doesn't work... :-)]

    Is it posible?

    Problems are everywhere... It is time to solve them :]
  • Re: Registering controls in masterpage and use them in pages?

    05-18-2005, 6:14 PM
    • Contributor
      2,738 point Contributor
    • kashif
    • Member since 06-11-2002, 1:34 PM
    • Posts 547
    • AspNetTeam
      Moderator

    If you want to register controls in one place and use them across a variety of pages, then I would suggest the use of the <controls> section under <pages> under <system.web> in web.config. Controls registered here can be used on any page withough having to add the register directive.

    Hope that helps!

       

  • Re: Registering controls in masterpage and use them in pages?

    05-19-2005, 4:56 AM
    • Member
      405 point Member
    • MRTotus
    • Member since 03-18-2005, 2:58 PM
    • Poland
    • Posts 81
    Thanks! That was exactly what I was looking for.
    Problems are everywhere... It is time to solve them :]
Page 1 of 1 (3 items)