A
Ash
What is the advantage of using a user control over a .aspx
page..
page..
Jim Cheshire said:Ash,
In a word, reusability. In legacy ASP, developers would often use include
pages for shared content. User Controls are the ASP.NET equivalent when
robust functionality is required in shared content.
Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)
This post is provided as-is with no warranties and confers no rights.
--------------------Content-Class: urn:content-classes:message
From: "Ash" <[email protected]>
Sender: "Ash" <[email protected]>
Subject: UserControls
Date: Wed, 19 Nov 2003 07:49:09 -0800
Lines: 2
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcOutKvs9mrAnxS3SkqILgq9KPhTLA==
Newsgroups: microsoft.public.dotnet.framework.aspnet
Path: cpmsftngxa07.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:191250
NNTP-Posting-Host: tk2msftngxa12.phx.gbl 10.40.1.164
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
What is the advantage of using a user control over a .aspx
page..
Subject: Re: UserControls
Date: Wed, 19 Nov 2003 11:32:59 -0700
Lines: 60
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: ilg195.ilg.com 63.117.253.195
Path: cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:191328
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
Another important reason is that you can cache the output of a user control.
For example, by putting
<%@ OutputCache Duration=60 VaryByParam="none" %>
at the top of your user control, you will cache the user control's rendered
output for 60 seconds.
--
----------------------------------------------------------------
Peter Provost
Weblog: http://www.peterprovost.org/
----------------------------------------------------------------
Jim Cheshire said:Ash,
In a word, reusability. In legacy ASP, developers would often use include
pages for shared content. User Controls are the ASP.NET equivalent when
robust functionality is required in shared content.
Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)
This post is provided as-is with no warranties and confers no rights.
--------------------Content-Class: urn:content-classes:message
From: "Ash" <[email protected]>
Sender: "Ash" <[email protected]>
Subject: UserControls
Date: Wed, 19 Nov 2003 07:49:09 -0800
Lines: 2
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcOutKvs9mrAnxS3SkqILgq9KPhTLA==
Newsgroups: microsoft.public.dotnet.framework.aspnet
Path: cpmsftngxa07.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:191250
NNTP-Posting-Host: tk2msftngxa12.phx.gbl 10.40.1.164
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
What is the advantage of using a user control over a .aspx
page..