Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 6th, 2012, 11:01 PM
Authorized User
 
Join Date: Feb 2006
Posts: 21
Thanks: 0
Thanked 1 Time in 1 Post
Default Web User Controls

Some authors suggest going all the way with web user controls; e.g.
- Header user control
- Menu
- MainContent
- Sidebar
- Footer
etc.
What best practices/rules can you suggest, and some rational for choosing?
Thanks for your help,
Michael Kaftor
 
Old August 7th, 2012, 03:43 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

That sounds a bit like pre ASP.NET 2 advice to me. By using master pages, you don't really need to include these kind of elements in a user control. You can centrally manage them from the master page. As shown in the book, you can program against the controls in the master page (swapping out a Menu for a TreeView in the DarkGrey theme for example).

If you have the need to replace them at run-time (switch between two versions) or have other cases for reuse, you could still do it. But I rarely do.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Form and User Controls CSharpSeeker C# 2005 1 August 22nd, 2007 03:15 PM
Web parts and User controls capitapicard BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 0 June 26th, 2006 04:11 PM
When to employ web services vs. user controls? VictorVictor BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 March 9th, 2006 06:53 PM
Accessing Web User Controls from code aquaboltar ASP.NET 2.0 Basics 0 October 26th, 2004 04:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.