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 because I do not need to store frontpage aspx and code behind files of the generic page in every web application folder. However, if I use custom control, then I have to inherit server Page class or some server control class for the web custom control class? I have no idea).

  Please give me some ideas to design and implement the generic aspx page in an efficient way.
Thank you in advance.

0
johnaspnet
10/19/2007 2:10:59 PM
asp.net.web-forms 93655 articles. 5 followers. Follow

1 Replies
1039 Views

Similar Articles

[PageSpeed] 45

 If you do not have very much HTML in your control, then you could design a custom control that inherits from the Panel control.  In the OnInit() method you can dynamically add the DropDownList, buttons, TextBox with the event handlers needed for your functions. 


Pat Dillon

http://www.integrify.com

0
dillon76
10/19/2007 3:27:41 PM
Reply:

Similar Artilces:

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

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... http://support.microsoft.com/kb/893667http://msdn2.microsoft.com/en-us/library/aa651710(VS.71).aspx itsUrDAY  Hi, See the following URLs: https://msdn2.microsoft.com/en-us/library/fb3w5b53(VS.71).aspx(Introduction to Web User Contr...

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

I have a web user control being used by another web user control, but the one being used will not display the labels in the resx file.
I am using DotNetNuke version 3.13 (might be 3.013) on a Window's XP machine, SP2. I have what I find to be an extremely odd situation. I have a project called TDS.Controls. This project is a web control library. Each control has its own resx file, which is located in the App_LocalResources directory. Each control inherits from Framework.UserControlBase, just like DotNetNuke's User control in DNN\Controls\User.ascx.vb. As a matter of fact, this control is doing the exact same thing I am trying to do. It is a web user control with its own resx file being used by another web user control (See ...

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

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

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

Use Web Control In a Web Control
Is this possible?I am working with an aspx page that consists of many different web controls.One of the web controls contains search criteria.  One of the criteria is a date range where I am trying to add a popup calendar --> which is another web controlCan I register the popupcaledar control on the questionaire control?  I have tried, but nothing seems to be registered.Any ideas will GREATLY help.Relax and have some Home Brew!Prosecute the Owner - Don't PERSECUTE the Breed!Breed Specific Legislation targets the WRONG end of the LEASH! Without seeing your code we can'...

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

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) www.piasi.org...

Web control in web control
Hi,There are two simple web user controls A and B, where B contains A. They just display the bunch of text boxes, so I do not need them even in tool pane. They sit in the same project next to web form.I noticed that web user control put on ASPX page does not appear in code behind, but if I create it with protected keyword and name being exactly the same as id it works fine. I can access such a web control from code behind and see the value assigned in IE. The problem is that the same routine does work for my A web control in B. When I assign the value IE, I keep getting null reference. ...

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

How to use a web user control from one web app in another web app?
I have a production web app project (at work) that has custom web user controls in it.I have another web app project for experimenting and I want to use some web controls from the production web app. The big trick is that I need to load the controls dynamically.LoadControl() doesn't seem to work - it complains about loading controls from a different application. I also tried adding a project reference to the production web app and using "UC1 newUC = new UC1();" and then "this.Controls.Add(newUC);", but the controls (like TextBoxes) on the web user control don't seem to exist on the new UC1s....

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:http://alpascual.com/blog/al/archive/2006/06/19/The-power-of-CompositeControl.-Another-skeleton-class-.aspxCheersAlMy 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....

Web resources about - Use Web Custom control or Web User control? - asp.net.web-forms

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

Control chaos while Devouring Stars in this strategy game
Devouring Stars Control chaos while Devouring Stars in this strategy game is a story by AppAdvice.com AppAdvice - iPhone, iPad, iPod, App Reviews ...

Nuance’s voice control going where Siri, Google Now and Cortana fall short
... for Samsung's S Voice and Apple’s Siri, is ready to go where no other digital assistant has gone before. The company wants to bring voice control ...

EU Acts on Refugees, Terrorism With Tougher Border Controls
Beset by the refugee crisis and fears of terrorism, the European Union floated plans to stiffen its external border controls for Europeans and ...

Sandy Hook parents assess victories, defeats in gun control mission
CBS News Sandy Hook parents assess victories, defeats in gun control mission CBS News NEWTOWN, Conn. Three years ago on Monday, a gunman opened ...

Apple is about to take even more control
... be about to get tough for some Apple partners as the company invests in top secret display technology development labs and increases its control ...

Google Updates BigQuery With New Cost Controls
Enterprises using BigQuery to run analytics against large data sets can now set a daily query quota on a project-wide or an individual basis. ...

After losing control of Parliament, Venezuelan socialists create a new one
After losing control of Parliament, Venezuelan socialists create a new one

Battle to control key Taiwan chip group
ASE makes $4bn takeover offer for local rival to thwart approach by China’s Tsinghua Unigroup

Anti-Terror: Visa Control, Airstrikes Seen as Most Effective
Americans are most likely to see overhauling the nation's visa waiver program and intensifying airstrikes against the Islamic State as effective ...

Resources last updated: 12/17/2015 11:06:38 AM