Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 January 6th, 2005, 08:32 AM
Authorized User
 
Join Date: Oct 2004
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default Include vs. User control(ascx)

Dear All,

What are the advantages of making a ASP.NET user control rather than include directive as used earlier in asp such as for header, footer, and sidebar .

I can use Include (apsx page) and user control(ascx) both for including , which one is better?

Thanks


Amit




 
Old January 6th, 2005, 12:11 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Without a doubt, use the user controls.

Hal Levy
I am here to help you, not do it for you.
 
Old January 7th, 2005, 05:27 AM
Authorized User
 
Join Date: Oct 2004
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am using controls but not able to find much advantages over includes.Just for information.

Thanks

Amit

 
Old January 7th, 2005, 11:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Just one of the many articles on the subject:
http://www.pardesiservices.com/softo...rControls1.asp

Hal Levy
I am here to help you, not do it for you.
 
Old January 8th, 2005, 09:40 AM
Authorized User
 
Join Date: Nov 2004
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to avanishp
Default

Hi

Benifits of user controls:

1. There are events in user controls.
2. You can define its properties and can set it .
3. User controls can be loaded dynamically.


Avanish






Similar Threads
Thread Thread Starter Forum Replies Last Post
ascx control Title SKhna ASP.NET 2.0 Basics 1 March 18th, 2008 12:24 PM
Problem with RssReader.ascx user control retroviz BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 October 24th, 2007 07:06 PM
Context.User in siteheader.ascx.cs scottf BOOK: ASP.NET Website Programming Problem-Design-Solution 7 November 3rd, 2005 12:52 PM
Using ascx file or include ajindal Classic ASP Components 1 October 6th, 2004 07:32 AM
ascx issue with User.Identity.Name ian.macey Classic ASP Basics 2 June 11th, 2003 02:50 AM





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