Sunday, May 25, 2014

Controls Interview Questions on ASP.Net(5)

Controls Interview Questions on ASP.Net(5)






1. What are user controls and custom controls?

A.Custom controls:
A control authored by a user or a third-party software vendor that does not belong to the .NET Framework class library. This is a generic term that includes user controls. A custom server control is used in Web Forms (ASP.NET pages). A custom client control is used in Windows Forms applications.
User Controls:
In ASP.NET: A user-authored server control that enables an ASP.NET page to be re-used as a server control. An ASP.NET user control is authored declaratively and persisted as a text file with an .ascx extension. The ASP.NET page framework compiles a user control on the fly to a class that derives from the System.Web.UI.UserControl class.


2.What is the difference between Label and Literal?

A.asp:Label control
asp:Label control is used to write text on the page with different formatting options like bold, italic, underlined etc.
asp:Literal control
Literal control is used to write simple text on the page, you can use server side formatting options like bold, italic, underlined.

3.What is AdRotator Control?

A.The AdRotator is an ASP.NET control that is used to provide advertisements to Web pages. The AdRotator control associates with one or many advertisements, which randomly displays one by one at a time when the Web page is refreshed. The AdRotator control advertisements are associated with links; therefore, when you click on an advertisement, it redirects you to other pages.

4. What does the .WebPart file do?

A.The .WebPart file explains the settings of a Web Parts control that can be included to a specified zone on a Web page.

5.Define Profile Properties?

A. ASP.NET provides a feature called profile properties, which allows you to store user-specific data. This feature is similar to session state, except that the profile data is not lost when a user's session expires. The profile-properties feature uses an ASP.NET profile, which is stored in a persistent format and associated with an individual user. The ASP.NET profile allows you to easily manage user information without requiring you to create and maintain your own database.


0 comments:

Post a Comment