Groups | Blog | Home
all groups > asp.net building controls > april 2004 >

asp.net building controls : using many user controls


suresh kumar via .NET 247
4/17/2004 2:19:56 AM
Hi,
I would like to use user controls such that my complete site contains just only user controls, but aspx pages which hold them.
i would like to have only one aspx page for diaplaying the controls, but dynamically i would like to load each control based on some criteria and display only one at a time.

it means that Ill be having many user controls and only one .aspx page, and based on the query string, or session value i decide which page needs to be displayed ad display that.

is this the better practice. please help

--------------------------------
From: suresh kumar

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

ccallen
4/17/2004 11:15:05 AM
Master Pages

1. "Standardize Your Site Fast With Master Pages" (has sample with source):
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspnet-standardize-masterpages.asp

2. www.wilsondotnet.com presents the topic well.

3. Search google for "master page".

Its basically a control that adds controls to itself. Although there are
many other ways to accomplish this, the beauty of Master Pages is that
theres a name (and lots of links) to refer to rather then having to explain
some obscure process.

ccallen

[quoted text, click to view]
dynamically i would like to load each control based on some criteria and
display only one at a time.
[quoted text, click to view]
and based on the query string, or session value i decide which page needs to
be displayed ad display that.
[quoted text, click to view]

Scott Mitchell [MVP]
4/18/2004 8:55:48 PM
[quoted text, click to view]
[snip]

I also have an article I wrote on MasterPages, if you're interested:

Creating Template-Driven Web Sites with MasterPages
http://aspnet.4guysfromrolla.com/articles/040704-1.aspx

Happy Programming!

--

Scott Mitchell
mitchell@4guysfromrolla.com
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

AddThis Social Bookmark Button