Use Web Custom control or Web User control?

  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.
10/19/2007 2:10:59 PM
📃 93655 articles.

💬 1 Replies

 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

10/19/2007 3:27:41 PM