Problem solve Get help with specific problems with your technologies, process and projects.

How do you use 'includes' in ASP.NET?

I'd like to know if there's a way to use:

<!--webbot bot="Include" U-Include="../../menu.htm" TAG="BODY" -->

in an ASP.NET Web form or if it's possible to include another page (htm, asp) in a ASP.NET Web form. Thank you.
The "new" way of performing includes in ASP.NET is called User Controls. Basically, they're full ASP.NET Web Forms without all the page-related tags such as HTML, HEAD, and BODY. The directive at the top of the file also changes from @page to @control. They don't render at design-time, unlike Custom Controls, but they provide a straightforward way to perform includes as you used to do in ASP.

Dig Deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.