Thursday, August 25, 2016

Server Control and Custom Control

  • Building block of the GUI
  • E.g. Textbox, Button , drop down list ...
  • E.g. Validation, Security , Master Page and data manipulation.
5 Type of Control :
  • HTML controls
    • <a>,<button>,<input type>
  • HTML server controls
    • HTML control with runat=server
    • Able run in ASP.NET
  • ASP.NET server controls
    • Validation control
    • Data source control - data binding
    • Data view control - list and table from data source
    • Personalization control - personalization of page based on user information
    • Login and security control
    • Master Page
    • Navigation control
    • Rich control - file upload and calendar control
  • ASP.NET AJAX server controls
  • User controls

Custom Control
  • Compile into DLL and used as any other ASP.NET server control.

Different Custom Control and User Control
  • Custom control are compiled into assembly (.dll), user control are not.
  • Custom control can add into toolbox, user control cannot.
  • Custom control are difficult to create, it has no designer, and everything done by code; user control are easier to create as similar to creating web pages.
  • Single copy of custom control can be used in multiple application (just browse to the location); A separate user control is required in each application

No comments:

Post a Comment