Custom Controls or User Controls


I have to create a menu control and I am unable to decide between a custom control or user control.  Apart from the fact that a custom control can be inserted into the toolbox what are the other advantages and disadvantages of each like performance, and so on.  Plus how do I decide between the two.



6/1/2007 10:51:11 AM 93655 articles. 6 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 15


Please refer to the KB article Overview of user controls vs. custom controls

Hope it helps,


Jessica Cao
Microsoft Online Community Support

“Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
6/4/2007 3:05:08 AM

You can decide between two according to your needs.

If you need  menu control again & again (in several applications) then you should go with Custom Control and if you need just current application specified menu then go with user Control.

Mark As Answer if this post is useful to you.
6/4/2007 3:39:22 AM

Similar Artilces:

User Control VB.Net x Web Custom Control
I was thinking in create a user control in VB.Net, and use it in a Asp.Net as possible? So I thought about it is gonna be better than make a Web Custom Control, so i thought again, nope... But i need to know better because a don't have a progress bar in for example.... Could Somebody tell me about??? in a reallity i know the asnwer but i would like to explain by myself... Thank's Antonio...

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...

Server Web User Control or Web Custom Control
Ok, I made a DataGrid I like, stuck it in a Web Control Lib, and then to my toolbar. Now I want to take my nice little control and add it to a greater control, maybe place some buttons around it etc. I could always inherit from it in a new custom control and dynamically add the buttons, but I thought about using a Web User Control. I thought I could easily create a Web User Control, drop on my grid and the buttons on a form, and expose some properties and events, but once I got into it, I got a feeling that this isn't what a Web User Control is for. When designing a control li...

Use Web Custom control or Web User control?
Friends,  I have a generic aspx page and its functions which is used in many .NET web application. The generic page contains a HTML Div control, server drop down list, server buttons, server textbox and it have different server and client functions to do its tasks for calling aspx pages in web applications. My problem is I do not know whether I should make that generic page as a web user control (but this is tedious because all other application folders must store frontpage aspx and code behind files of the generic page) or as a web custom control (This seems to be good beca...

What is the difference between a Web User Control and a Web Custom Control
Hi ,please could you answer for the following question with example. i know wht they are. but i want to know hw they are existing in web pages with simple example. What is the difference between a Web User Control and a Web Custom Control?  Thanks in AdvanceDilip    Check this out .... hope these might help you out... itsUrDAY  Hi, See the following URLs: to Web User Contr...

Custom User Controls v. Custom Web Controls
Hi! Is it better for me to begin coding my controls instead of just designing them? What would the benefits be? I meen, i seem to be able to get all i need from just putting stuff together on an ASCX file but i'm obviously missing a huge concept here... please explain! Hi, creating user controls is indeed easier than creating custom server controls because you can simply drag & drop other controls on the form, easily add events to it, ... Custom controls however are better when you want to reuse them in several other projects. I like to create custom controls for small, reusable com...

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...

How to access individual controls from a form containing the web user control containing those controls
 Below is a block of code in my .aspx form named default.aspx. In this form I load a web user control. I then add it to a place holder control.(Lines 3 and 4 below) So how do I access the individual controls in my web user control? I want to set the properties on those controls, but I am baffled as to how to access the control. For example I have a text label control named "label3". How do I access this control. Because for example, under certain situations I want to hide that control. ( Label3.Visible = false;)  1    if(!Page.IsPostBack) 2&nb...

custom web user control and web form
Guys,          I am trying to develop a context menu control for all of my pages. what i am trying to do is that i want the control to pick a datasource from the markup and then check whether its an xml file or a datatable. I created a class called datasource.   /**************************DataSource Class****************************/  public class DataSource { /// <summary> /// This is to identify unique elements from the markup /// </summary>protected string _ID; /// <summary> /// This will be the Datasource ID e...

what is the difference between web custom control,web user control,component class
please tell me in detail what is the web custom control,web user control,component class and what is the difference between web custom control, web user control,component class and when to use web custom control, when to use web user control, when to use component class Oh gosh. Such a nice question! I recommend you to start with this link from MSDN click here . I think you'll need a lot of coffe :) .George (.NET or .NOT)

Web Custom Control within a Web Custom Control
I was wondering if this can be done and how. I've created a simple custom control that displays a header which is my first custom control. So I'm just a baby when it comes to this.. Within the header I currently have a property for breadcrumbs which is a string. What I would like to do is have the breadcrumb property  be a Link Button List. I did find a custom control of a Link Button List which is exactly what I wanted. My question is how can/do  I include this into my custom control? Can it done? How? Please help? I'm at a lose here.   Susan You should be able to do ...

Is it possible to have a web custom control( not a user control) in the app_code folder of a web project?
Or must it be inside a class library by itself? Do you compile the web site to get the dll then add that to the toolbar? Yes you can find the info here: BlogMapStats.NETPlease click on 'Mark as Answer' if this post answered your question! Sorry, I'm not following. What does extending a composite control illustrate about creating a custom web control inside the appcode folder of web project....

Add .Net Control to Web Custom Control
 I want to add .NET Control (like: TextBox, Button...) to Web Custom Control.How i can do it? Alphavn That's called a composite control -- "Mark As Answer" if my reply helped you -- Hello Guys What gunteman said, that is one approach and in most cases the right one.But its also possible to add child controls to a Control thats inherit from WebControl itself. Be sure to implement INamingContainer to that inherited Control too, thats the important point of that approach.--Microsoft MVP - Visual Developer ASP / ASP.NET-

have probs in Web User Control and Custom Control
Can we Create a Control like ActiveX control in VB, I found two types of Control in Custom Control,User Control but they are not like ActiveX Control in VB because they dont show all the PRoperties that we created in .ascx files when these controls are put in the Web forms at Design time in Properties Box. Please guide me regarding this Actually web custom controls will show the properties in the properties window, and you are correct about user controls. If you want to create a control that can be packaged and used in different web projects use a custom control. Remember that c...

Custom Web Control inside another Custom Web Control
Hi I created a custom web control (CusWebNew) that displays some textboxes by adding them to the ControlCollection of the webcontrol. I also created a custom webcontrol (CustWebButton) that inherts from Button control, and overrided the OnClick function. When I use CustWebButton on a regular web form, it seems to function correctly. However, when I added to be part of the ControlCollection of CustWebNew, it stops to work.   Any ideas why? Thanks Hey, What do you mean by stops to work?  Explain what you are trying to do with it and what it doesn't do.Brian"Trust in the...

Web resources about - Custom Controls or User Controls -

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

TERROR IN JAKARTA: 'Situation under control' after explosions, gunfire erupt in Indonesian capital
At least six people are dead, including three police officers, after several explosions at the Sarinah shopping mall in an apparent multi-site ...

DFES downgrades bushfire in Dunsborough as it is contained, but not under control
A BUSHFIRE south of Dunsborough has been contained but is not yet under control.

Queensland police shut down out-of-control party in Berserker, Rockhampton
Police shut down a party of 150 young people who had gathered at a house in Berserker, Rockhampton on Friday night.

Contextual and Granular Notification Controls
... written a lot about notifications, at one point calling the notifications screen “my home screen.” But I don’t like how we are forced to control ...

ESI cost control and networks
There is an interesting discussion thread on Twitter about how the way Medicare for All saves money is by significantly reducing provider, device, ...

While No One Was Watching, Obama Took Control of the Courts
... and President Obama’s legacy.” It didn’t favor conservatives but there was a dramatic shift to the far left. The appellate is under the control ...

Sanders Backs Gun Control Legislation Ahead of Democratic Debate
Hillary Clinton's campaign calls her rival's move a "debate-eve conversion."

Apple has landed a very rare sponsorship deal to ensure it has control of the hottest ticket in San Francisco ...
Apple has signed up for the first time to become a sponsor of the Super Bowl Host Committee, Daniel Roberts at Yahoo Finance reported. It's ...

Leonardo DiCaprio: The Oscar stuff is ‘completely beyond my control at this point’
... last night’s London premiere of The Revenant . Leo is looking pretty good these days. He’s de-bloated, his facial hair is very much under control, ...

Resources last updated: 1/17/2016 11:23:22 PM