Single page with multiple user web controls VS Multiple page with specific user web controls

I have a question regarding single page with multiple user web controls vs multiple page with specific user web controls


Option 1: I am of the opinion to have multiple pages with specific user web controls and use an object to store all the information as the user navigates through the application. And finally at the end, read this object and save all the information to the backend database.


Option 2: My respected team member suggests that we have only one page, with all the specific user web controls and not use an object, instead show/hide the user web controls based on the navigation. And at the end, access the user controls and pick all the data and save that to the backend database.


Next, coming to the number of user web controls, We will have about appr. 25 user web controls, and quite a number of them would be inter dependant on each other.


I will like to get the idea of other programmers what is the problem with each of these styles of programming.


According to me,

Cons for Option 2

  • Not optimized if we have about 25 user web controls which are inter dependant.
  • Increases the onload time to populate all the user web controls.
  • Tougher to modify, if the requirement changes after the page has been created.
  • Viewstate will be huge.
  • Very challenging to do a postback.

Pros for Option 1

  • Easier to handle data as we using a common object across the pages.
  • Reduced load time, There is no reason to download all the data on start of the application, if the user decides not to complete the form.
  • Easier to change, if the requirement changes after the pages has been created.


I hope to get some more pros and cons for each of these options.


Thank You,


9/23/2005 3:37:11 PM 93655 articles. 6 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 35
Get it on Google Play
Get it on Apple App Store

I have done it both ways but if the project is not that large, I prefer
to put all controls on 1 page. What I do is set what would be different
pages up in different panels. Each panel contains the appropriate
controls and I hid/show as necessary. What I like about this is the
ease of not having to get my page values to another page via say the
querystring or a server.transfer which forces me to requests each form
item like old asp. One trick that I have done when using mutiliple
pages is to put the page object into a session and grab it on the next
page. This worked out great!
9/23/2005 5:18:17 PM

I ran into this question last week.

My answer to myself (Big Smile [:D]) was to use Dynamic UserControls.

This way you would load all the content you have which is stored in  a usercontrol dynamically, such that no overload of viewstate.



Bilal Hadiar, MCP, MCTS, MCPD, MCT
Microsoft MVP - Telerik MVP
9/23/2005 7:14:58 PM
I would prefer haidar's way of doing this...We too have done in the same way, by having a master aspx page hosting different user web controls dynamically using Placeholder or some other similar container control.



9/23/2005 7:46:03 PM

Similar Artilces:

Adding multiple user controls to a web page -- Tutorial example involving copyRughtNotice and pageHeader user controls.
Hello: Please help me... I am trying to work through the tutorial example for adding the pageHeader.ascx usr control to a web form that already has a user conrol embedded in it, I followed the instructions verbatim, and, NO PAGE HEADER AT ALL!!!! What am I doing wrong? I really need help on this ASAP!!! Thnx, Carle Eric Giannelli Carle Eric Giannelli Can you post the code at the top of the .ASPX page? Specifically the <%@ parts... Sure, The code at the top of the copyRightNotice.aspx page is: <%@ Page Language="VB" %>...

Web User Control to Web User Control...
Hi, I have 2 User controls on a page and want Control1 to call a method of Control2. Is this Possible? Example: Con1 = Datalist showing products, each with a Quantity Box and a Button. Con2 = Repeater showing Cart Preview (name, Price) in page.aspx. When I click on the button on the DataList in Con1 it adds the item into the Session based Cart. However it does not update the Cart Preview. I need to call BindPreview() in Con2 in order to update the Cart Preview... Does that make sense? argh! any help much appreciated! PeteWeb Design Nottingham, UK Well I can call BindPreview() from m...

access controls on web user control x from web user control Y
I have 2 web users controls in a page and I would like to get or set the selected values of a few dropdown boxes on web user control X from web user control Y and I also would like to know how to access functions that are on a web user control X from a web user control Y, is this possible? How can I do it? User can access and set the values of the User Control from .aspx page through properties,using javascript and in code-behind of aspx page.The details of it are shown below Using PropertiesIf the Sample.ascx control has two textboxes and submit button.You can access the valu...

Add user control from user control to web page
Hi there, I have a user control, that is inside another user control on a web page. From this user contfol, I need to add something to a place holder on the parent web page. I am having troubles referencing the placeholder correclty. I can get it fine as build time, but on runtime it kicks up the "Object reference not set to an instance of an object" error. Any ideas would be greatly appreciated. -------------------------------------------------------------- protected Civil_and_Corporate.candcadmin._default _default; ------------------------- Control objControl...

Web page .aspx is slow when loading. Pages have web user controls on them that are loaded dynamically
I have written a web application using VS 2003. Several of my forms have web user controls on them. The controls are loaded dynamically at runtime. The problem is that the web pages are very slow to load. Does anyone know if there is a way to speed up the pages being loaded into the browser? Here is an example of some code I use to dynamically load the controls:  private void Page_Load(object sender, System.EventArgs e)  {   // Put user code to initialize the page here   // Put user code to initialize the page here    Co...

Web Menus / User controls in aspx web page and .aspx C# based web templates
Dear all, I have created several user controls and included in the webpages. (This user control is a navigation menu consisting of images) This has to be included in all webpages. But when i tried to publish i get error messages for them. But i can’t remove since i need these user controls. Error message given below Error 2 The type 'WebUserControl' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\new_latest\d203e69a\d67c356f\App_Web_ijsq-eqk.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\new_la...

How to compile web user control from web page?
Here is an web application which alows user to change the properties of Web User Control from web page, the problem here is how to compile the web user control behind user click 'Submit' button? I dont extravagantly hope I can get solution here, anybody can tip any ideas?Cheers...

Web User Control not working on Web Page
I created a web user control to contain 3 grids and then used a span tag so that the window shows only one grid but can be vertically scrolled to show all three.  It works great on the control but when I drag the control onto a web page all 3 grids are displayed and the scroll bars are missing.  Does anyone have any suggestions for this or have run into this problem before.  Thanks........

web controls and web user control
i have a problem in a web form , I have a webform that contains a web user control which in turn contains a html input form ,the web control events don't fire up ,When I click button ,no effect ,I don't know what is the effect of the html form which is in the web user control on the web controls in the web form ?? can any one help me the web control event should be handle in the code behind page, is the event handler for the button you are clicking registered? You can try double clicking the button, should give you the default btn_click event handler in code behind. Also, make ...

multiple user control into a web form (how do I keep the status of each control?)
A user control implements a quiz.The control has a property (id_question) to choose the different question the user control have to display. The user control have another property, its STATUS (status = 1 mean to show the question, status=2 means to show a message to the user that have answered the question). In the user control there is a button, clicking the button to answer the question cause the control post the form and call a DB and register the answer. During Postback, in page_load method of the user control I change the status from 1 to 2 (from show quest...

Multiple type of Users, with Multiple User login pages in one web application
Hello Friends, I have a situation in my website.I am using form authentication in my web application where I have two type of usersMerchants & Customers Merchants sign in from url/msignin/default.aspx and after sign in it redirects to secure folder /merchants/welcome.aspx and Customers sign in from/csignin/default.aspx and after sign in it redirects to secure folder /customers/welcome.aspx Now I am confused on the point that I only have one login url in my web.config file and only one default url. How can i make these two situations work on my same application. Please help. ...

controlling an object in a web control from the page the web control is placed in
I have created a web control in that has an image button and an image. when it loads the image button is visible and the image is not. I want to be able from the page which "includes" the web control to set the image button to invisible and the image to visible. When I tried this, the main page didn't recognise the image button or the image (both < asp: objects). help would be gratefully appreciated. oh yeah, it's inline code so any code behind stuff will just confuse me ;) Some code please.-- Justin Lovell...

Persisting data in a web user control, which contains a list of other web user controls.
 Hi All, I have a control I've created, which can have a number of child controls - also user controls - stored as an ArrayList, which can be added wither a design time or programmatically.My problem is when I add to the list programmatically, it doesn't persist them. So if I add 3 child controls in step 1 of a wizard, with the aim that those three will be visible inside the parent in step 3, what happens is that the parent has no child controls and the item count is 0.Can anyone help? Thanks in advance.Code:Parent Control Markup: <%@ Control Language="C#" Auto...

Multiple Web Forms vs dynamic User Controls
 Hi,I am starting on a new web application project. Like to seek opinions and/or your personal experiences on which would method would you advise: 1) Creating a web form for each webpage-OR-  2)  Have a single web form which acts as a portal page and dynamically loads in user controls (e.g like how Dotnetnuke does it)  Thanks in advance. Cheers,San    I've gone both routes and would say I prefer the webpage for each method. Its much cleaner to keep your code behind and viewstate in order on individual pages. Also if you're using AJAX con...

Web resources about - Single page with multiple user web controls VS Multiple page with specific user web controls -

Code division multiple access - Wikipedia, the free encyclopedia
Code division multiple access ( CDMA ) is a channel access method used by various radio communication technologies. It should not be confused ...

Sydney Trains missed multiple chances to avoid Edgecliff derailment, says ATSB report
... has highlighted concerns about a focus on a &quot;can-do culture&quot; rather than safety. Sydney Trains staff and senior managers missed multiple ...

Facebook Adds Multiple Matching Options for Custom Audiences
Facebook has added real-time matching across multiple data types to its custom audiences ad-targeting tool. The social network said in a Facebook ...

Meet the man who made "multiple six figures" in 5 days — playing daily fantasy sports
In the world of daily fantasy sports, there are two types of games: cash games and tournaments. Cash games can be head-to-head against one person, ...

Adult film star James Deen responds to multiple assault allegations
View image - The following story is not for readers under 18 James Deen is probably the most famous adult film star working ...

Multiple Victims In San Bernadino Mass Shooting; 1-3 Shooters Sought
When is it enough to actually do something? Fuck the NRA. Fuck the Republican party and the right wing hate machine. Those Syrian refugees might ...

The Philadelphia 76ers announced that they suspended Jahlil Okafor—he of the multiple fights outside
The Philadelphia 76ers announced that they suspended Jahlil Okafor—he of the multiple fights outside of bars and one of their only competent ...

Bluestacks now runs multiple Android apps on Windows simultaneously
Bluestacks has come a long way since its original app player in 2011, which was notable for being one of the first methods for running Android ...

Chinese Investors Value Manchester City At Higher Multiple Than Manchester United
Chinese Investors Value Manchester City At Higher Multiple Than Manchester United

Ohio Teen convicted for multiple swatting attempts
A Painesville, Ohio teen has been sentenced to five years in a juvenile correctional facility this week for calling in multiple fake emergencies ...

Resources last updated: 12/8/2015 4:00:17 PM