How to share web controls between pages

Discussion in 'ASP .Net' started by Giraffe, Jul 19, 2006.

  1. Giraffe

    Giraffe Guest

    If you have lots of different pages , but they all have a common web
    control and you'd like to some how share this code for maintainability,
    re-usability reasons, how would one accomplish this in ASP.Net?
     
    Giraffe, Jul 19, 2006
    #1
    1. Advertising

  2. If you already have the control written, just put it on every page.

    "Giraffe" <> wrote in message
    news:e9lopn$2ut7$...
    > If you have lots of different pages , but they all have a common web
    > control and you'd like to some how share this code for maintainability,
    > re-usability reasons, how would one accomplish this in ASP.Net?
     
    Marina Levit [MVP], Jul 19, 2006
    #2
    1. Advertising

  3. Giraffe,
    It *sounds* like you are describing the functionality of the ASCX
    UserControl. Have you looked at this?
    Peter

    --
    Co-founder, Eggheadcafe.com developer portal:
    http://www.eggheadcafe.com
    UnBlog:
    http://petesbloggerama.blogspot.com




    "Giraffe" wrote:

    > If you have lots of different pages , but they all have a common web
    > control and you'd like to some how share this code for maintainability,
    > re-usability reasons, how would one accomplish this in ASP.Net?
    >
     
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Jul 19, 2006
    #3
  4. Giraffe

    Giraffe Guest

    * Marina Levit [MVP] wrote:
    > If you already have the control written, just put it on every page.


    This is OK if I'd like the same control on each page and wanted it
    modified specifically within each page.

    What I'd actually like is a control to have the same look, feel and
    appearance (properties) on each page, and would like therefore some
    central mechanism for setting these common characteristics, and I'd also
    like some common routine to populate the control with actual data.

    So some shared-code method of setting it up and populating it.

    Basically for example say I have a datagrid on lots of pages that
    display stock information, but the rest of the page is completely
    different (specialised) how would this best(properly) implemented.

    Ta.
     
    Giraffe, Jul 20, 2006
    #4
  5. Giraffe

    Giraffe Guest

    * Peter Bromberg [C# MVP] wrote:
    > Giraffe,
    > It *sounds* like you are describing the functionality of the ASCX
    > UserControl. Have you looked at this?


    See my repsonse above, does this still sound like the UserControl?
     
    Giraffe, Jul 20, 2006
    #5
    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. =?Utf-8?B?R3JlZyBTbWFsdGVy?=

    Is it possible to share Master Pages between web sites?

    =?Utf-8?B?R3JlZyBTbWFsdGVy?=, Jul 5, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    361
    =?Utf-8?B?R3JlZyBTbWFsdGVy?=
    Jul 5, 2005
  2. Nathan Sokalski
    Replies:
    5
    Views:
    1,083
    Gaurav Vaish \(www.Edujini-Labs.com\)
    Jan 10, 2007
  3. Nathan Sokalski
    Replies:
    4
    Views:
    341
    Nathan Sokalski
    Dec 21, 2006
  4. Nathan Sokalski
    Replies:
    4
    Views:
    378
    Nathan Sokalski
    Dec 21, 2006
  5. Saraswati lakki
    Replies:
    0
    Views:
    1,428
    Saraswati lakki
    Jan 6, 2012
Loading...

Share This Page