An asp.net control class derives from System.Web.UI.Control
Override Render/RenderContents method to provide control output
The two base classes for controls are:
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
To use the custom control on a webpage, it must be registered, either on the webpage or in web.config
Registering on page:
%@Register TagPrefix=”aspSample” NameSpace=”nameSpace.name”%
Registering a control in web.config
system.web pages controls
add tagPrefix=”aspSample” namespace=”nameSpace.name”add
controls pages system.web
To use a custom control on a webpage: Create a bin folder in site’s root
Copy the control assembly (dll) in bin folder
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment