Quick Question - Moving from asp to asp.net

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
 
S

steve

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.
 
S

Steve C. Orr [MVP, MCSD]

User controls are usually the best migration path for include files.
I think they would be especially good for the menu scenario you described.
 
J

John Timney \(Microsoft MVP\)

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>
 
J

Jim Nugent

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,
 

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
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top