Need Alternative to Server Side Include in Asp.Net

P

PinkBishop

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
 
R

Rad [Visual C# MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top