Interview questions

.Net - how to create an inherited control

Next question>>           Learn .NET
.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 control.
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.

Next question>>

Also read

Working with the DataList 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...........

ASP.NET displaying data using DataList 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..........

Binding images to a DataList control dynamically

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...........

ASP.NET validation control

Define Validation Control in ASP.NET.
What are the validation types supported by ASP.NET?
Describe the steps to use Validation Control...............

Data Controls

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 new controls

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 Feature

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.................

ASP.NET 2.0 Security Controls

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 preferences................. 

ASP.NET 2.0 Validation Groups

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............... 

Selecting, editing and delete data using DataList control

In this series, we will explore how to Select, Edit, and Delete data using the DataList control........... 



Write your comment - Share Knowledge and Experience


 

 
Latest placement tests
Latest links
 
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring