Introducing Custom Controls
page 3 of 6
by . .
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 30983/ 108

Getting Started
Getting Started

In VS.NET you just create a Web Custom Control Library and you're set.

In Notepad, you will need to create a normal .vb file and add the following -

Imports System.Web.UI

Namespace
AGASP

Public
Class
Ctrl1
Inherits
System.Web.UI.WebControls.WebControl

..code goes here...

End Class

End
Namespace

You can see that we are Inheriting the System.Web.UI.WebControls.WebControl class, we could Inherit the Control class, but this one already does inherit Control and provides some additional methods, properties etc.


View Entire Article

User Comments

Title: Custom vs. User control BLUNDER – user control CAN be referenced in the code.   
Name: Igor Kikena
Date: 2005-03-14 3:53:38 PM
Comment:
Implementing page can reference user control exactly the same way as custom control, otherwise there is really little use for them. And Yes, it does not create user control variable when you drag and drop it on the page, contrary to custom control. So leave your mouse alone and strike the damn keyboard and enjoy user controls in the code behind.

Igor Kikena
Title: Ok..Its a good Topic   
Name: Esha
Date: 2005-03-08 4:47:14 AM
Comment:
I will be better if u give an sample code for building custom control and embedding it in asp webform page
Title: airo   
Name: airo
Date: 2005-01-13 10:13:47 PM
Comment:
Excellent topic and well explained.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2018 ASPAlliance.com  |  Page Processed at 2018-01-20 2:07:32 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search