Need Alternative to Server Side Include in Asp.Net

Discussion in 'ASP .Net' started by PinkBishop, Apr 20, 2007.

  1. PinkBishop

    PinkBishop Guest

    I have created a menu page using the .net menu control.

    I would like to include the page at the top of each of the my pages.

    In classic asp i would just code <!-- #Include File="fileName.asp" -->

    If I try <!-- #Include File="fileName.aspx" --> in .aspx I get errors
    to the effect of duplicate code between the two pages.


    What is the alternative in including files in the .net frame work?

    Thanks

    TRU
    PinkBishop, Apr 20, 2007
    #1
    1. Advertising

  2. On Thu, 19 Apr 2007 22:45:41 -0400, PinkBishop wrote:

    > I have created a menu page using the .net menu control.
    >
    > I would like to include the page at the top of each of the my pages.
    >
    > In classic asp i would just code <!-- #Include File="fileName.asp" -->
    >
    > If I try <!-- #Include File="fileName.aspx" --> in .aspx I get errors
    > to the effect of duplicate code between the two pages.
    >
    > What is the alternative in including files in the .net frame work?
    >
    > Thanks
    >
    > TRU


    Try and avoid includes -- they cause more problems than they solve. Use
    User Controls instead. They can achieve the same goals much better and are
    a much better use of ASP.NET's functionality
    --
    Bits.Bytes
    http://bytes.thinkersroom.com
    Rad [Visual C# MVP], Apr 20, 2007
    #2
    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. Matt
    Replies:
    2
    Views:
    553
  2. Matt
    Replies:
    14
    Views:
    4,070
    Chad Z. Hower aka Kudzu
    Jan 30, 2004
  3. =?Utf-8?B?b25l?=
    Replies:
    1
    Views:
    5,265
    Karl Seguin [MVP]
    Mar 8, 2006
  4. Replies:
    2
    Views:
    339
  5. Andreas Bogenberger
    Replies:
    3
    Views:
    879
    Andreas Bogenberger
    Feb 22, 2008
Loading...

Share This Page