Quick Question - Moving from asp to asp.net

  • Thread starter Thread starter Neil Steventon
  • Start date Start date
N

Neil Steventon

Hi ,

Just wondering, in my old asp websites when I created a navigation menu or
header bar I placed this in a file and included it in all others which made
maintenance alot easier.

In asp.net is it best to use such an include file as before or would it be
better to create a user control ascx and include that in all files, any good
articles or any suggestions.

Thank alot

Neil
 
You definitely don't want to use include files in .net. But since you're
migrating, I'm not sure what the best approach is. You may need to keep
them for compatibility.

There are docs in msdn regarding classic asp migration strategies.
 
User controls are usually the best migration path for include files.
I think they would be especially good for the menu scenario you described.
 
Its better to use user controls as they are much more object based and can
be interacted with in many different ways. With include files your still
living in the dark ages really in terms of reusing common functionality.

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
 
Neil Steventon said:
Hi ,

Just wondering, in my old asp websites when I created a navigation menu or
header bar I placed this in a file and included it in all others which made
maintenance alot easier.

In asp.net is it best to use such an include file as before or would it be
better to create a user control ascx and include that in all files, any good
articles or any suggestions.

Where I work, we've found it easiest in ASP.NET to build user controls for
side menus, headers, etc. that appear on every page. If you use Visual
Studio and Code-behind, you'll find yourself doing a lot of the repeititive
work with C# (or VB) objects as well.

My $0.02 worth,
 
Back
Top