#include equivalent for aspnet

Discussion in 'ASP .Net' started by dee, Aug 14, 2005.

  1. dee

    dee Guest

    Several pages in our site use the same code. Is there a way to use the same
    idea as the old C #include technique in an aspnet application.
    Thanks.
    Dee
    dee, Aug 14, 2005
    #1
    1. Advertising

  2. dee

    Lucas Tam Guest

    "dee" <> wrote in
    news:O#$:

    > Several pages in our site use the same code. Is there a way to use the
    > same idea as the old C #include technique in an aspnet application.


    Couple ways of doing this... depending on the type of code:

    1. Build a User Control / Custom Control
    2. Build a shared DLL
    3. Use MasterPages to build a template system





    --
    Lucas Tam ()
    Please delete "REMOVE" from the e-mail address when replying.
    http://members.ebay.com/aboutme/coolspot18/
    Lucas Tam, Aug 14, 2005
    #2
    1. Advertising

  3. dee

    Jon Paal Guest

    You can do as Lucas suggested or use server side includes which are still
    supported


    "dee" <> wrote in message
    news:O%23$...
    > Several pages in our site use the same code. Is there a way to use the
    > same idea as the old C #include technique in an aspnet application.
    > Thanks.
    > Dee
    >
    >
    Jon Paal, Aug 14, 2005
    #3
  4. dee

    dee Guest

    Thanks

    "Jon Paal" <Jon nospam Paal @ everywhere dot com> wrote in message
    news:%...
    > You can do as Lucas suggested or use server side includes which are still
    > supported
    >
    >
    > "dee" <> wrote in message
    > news:O%23$...
    >> Several pages in our site use the same code. Is there a way to use the
    >> same idea as the old C #include technique in an aspnet application.
    >> Thanks.
    >> Dee
    >>
    >>

    >
    >
    dee, Aug 14, 2005
    #4
  5. dee

    dee Guest

    Thanks.

    "Lucas Tam" <> wrote in message
    news:Xns96B27BE5558Bnntprogerscom@127.0.0.1...
    > "dee" <> wrote in
    > news:O#$:
    >
    >> Several pages in our site use the same code. Is there a way to use the
    >> same idea as the old C #include technique in an aspnet application.

    >
    > Couple ways of doing this... depending on the type of code:
    >
    > 1. Build a User Control / Custom Control
    > 2. Build a shared DLL
    > 3. Use MasterPages to build a template system
    >
    >
    >
    >
    >
    > --
    > Lucas Tam ()
    > Please delete "REMOVE" from the e-mail address when replying.
    > http://members.ebay.com/aboutme/coolspot18/
    dee, Aug 14, 2005
    #5
  6. Include files are old fashioned.
    User controls are a better approach. Yes, they can contain any kind of
    controls you'd like. You can create public properties, methods, and events
    to facilitate communication between the user control and the page.
    Even better is the "Master Pages" functionality that will be included with
    ASP.NET 2.0.

    Here's more info:
    http://SteveOrr.net/faq/UserCustom.aspx
    http://aspnet.4guysfromrolla.com/articles/010505-1.aspx

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "dee" <> wrote in message
    news:O%23$...
    > Several pages in our site use the same code. Is there a way to use the
    > same idea as the old C #include technique in an aspnet application.
    > Thanks.
    > Dee
    >
    >
    Steve C. Orr [MVP, MCSD], Aug 15, 2005
    #6
  7. dee

    dee Guest

    Thanks

    "Steve C. Orr [MVP, MCSD]" <> wrote in message
    news:...
    > Include files are old fashioned.
    > User controls are a better approach. Yes, they can contain any kind of
    > controls you'd like. You can create public properties, methods, and
    > events
    > to facilitate communication between the user control and the page.
    > Even better is the "Master Pages" functionality that will be included with
    > ASP.NET 2.0.
    >
    > Here's more info:
    > http://SteveOrr.net/faq/UserCustom.aspx
    > http://aspnet.4guysfromrolla.com/articles/010505-1.aspx
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://SteveOrr.net
    >
    >
    > "dee" <> wrote in message
    > news:O%23$...
    >> Several pages in our site use the same code. Is there a way to use the
    >> same idea as the old C #include technique in an aspnet application.
    >> Thanks.
    >> Dee
    >>
    >>

    >
    >
    dee, Aug 15, 2005
    #7
    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. Gary Nelson

    Upgrade from aspnet 1.1 to aspnet 2.0

    Gary Nelson, Oct 14, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    467
    Gary Nelson
    Oct 14, 2005
  2. Replies:
    7
    Views:
    622
    Juan T. Llibre
    Mar 23, 2007
  3. Andreas Bogenberger
    Replies:
    3
    Views:
    876
    Andreas Bogenberger
    Feb 22, 2008
  4. Brian Schuth
    Replies:
    0
    Views:
    260
    Brian Schuth
    Sep 8, 2003
  5. Alfred Sehmueller
    Replies:
    0
    Views:
    249
    Alfred Sehmueller
    Feb 20, 2004
Loading...

Share This Page