.Net - Explain with code sample how to create an inherited
control. - June 03, 2009 at 11:00 AM by Shuchi Gauri
Explain with code sample how to create an inherited control.
Steps to create inherited Control:-
a. Create a new project.
b. Add a custom control to the project.
c. Change the name of the class you need to inherit the control from the base
class. E.g. inherit the class from System.Windows.Forms.Button if the control s
to be inherited from a button class.
d. Implement the control with custom properties and featured needed by the
e. Override the OnPaint method if the control’s appearance needs to be changed.
f. Save the build the control
g. Reference you control into another or the same project and use the control.
The DataList control like the Repeater control is a template driven, light
weight control, and acts as a container of repeated data items. The templates
in this control are used to define the data that it will contain. It is
flexible in the sense that you can easily customize the display of one or more
records that are displayed in the control...........
The DataList control contains a template that is used to display the data items
within the control. Since there are no data columns associated with this
control, you use templates to display data. Every column in a DataList control
is rendered as a <span> element..........
Let us now see how we can display images using the DataList control. Here is a
situation where this control scores over the other data-bound controls as you
can set the RepeatDirection property of this control to Horizontal so that we
can display the columns of a particular record in one single row...........
Define Validation Control in ASP.NET.
What are the validation types supported by ASP.NET?
Describe the steps to use Validation Control...............
one of the important goals of ASP.NET 2.0 is 70% code reduction. The data
controls supplied with ASP.NET 2.0 play an important role in making this
ambitious goal a reality. Data source controls provide a consistent and
extensible method for declaratively accessing data from web pages...........
ASP.NET 2.0 introduces several new controls that help create data-driven web
applications. These controls perform actions, such as connecting to a database,
executing commands against the database, and so on..............
Caching is defined as temporary storage of data for faster retrieval on
subsequent requests. In ASP .NET 2.0, the caching support is integrated with
the DataSource controls to cache data in a web page. ASP.NET 2.0 also now
includes automatic database server cache invalidation.................
With the large amount of business being done on the web, security is vitally
important for protecting not only confidential information such as credit card
numbers, but also users’ personal details and
With ASP.NET 2.0, Microsoft introduces a new feature known as validation groups,
which enables you to create different groups of validation controls and assign
them to input controls, such as text boxes...............
In this series, we will explore how to Select, Edit, and Delete data using the