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.
⭐ 6 followers.

💬 1 Replies
👁️‍🗨️ 1469 Views



 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: