Here are some question n answers....
1. What are HTML controls, Web controls, and server controls?
HTML controls- represent common HTML elements and are available through the HTML tab of the Visual Studio .NET toolbox. You can drag these controls to a Web form and set their properties in the Properties window. An HTML control, such as Text Field or Label, is converted to its appropriate HTML equivalent, such as the <INPUT> and <DIV> element, respectively, in the source code of the ASPX file. All the HTML controls are automatically placed inside an HTML <FORM> element.
HTML server controls are similar to HTML controls with the added feature of server-side availability. You can convert any HTML control to run as an HTML server control by adding a runat="server" attribute to its declaration. You can accomplish the same task visually by right-clicking an HTML control and selecting Run As Server Control from the shortcut menu.
Web server controls provide a higher level of abstraction than HTML server controls because their object model matches closely with the .NET Framework rather than matching with the requirements of HTML syntax.
The Web server controls have several advanced features, including
Web server controls provide a rich object model that closely matches with the rest of the .NET Framework.
Some Web server controls provide richer functionality, such as the Calendar control, AdRotator control, and so on, not available with HTML controls.
Web server controls have advanced features such as automatic browser detection, automatic postback, and event bubbling.
Web server controls are declared in code explicitly by prefixing the class name of the Web server control with the namespace asp and separating both with a colon (:), as well as including the runat="server" attribute in its definition. For example, a Label Web server control can be declared in code as <asp:Label runat="server"/>.
Most Web server controls derive their functionality from the WebControl class of the System.Web.UI.WebControls namespace.
2. Briefly explain how the server control validation controls work.
User Input Validation
ASP.NET provides a set of Web server controls called validation controls that provide sophisticated validation on both the client side and the server side depending on the validation settings and the browser's capabilities.
ASP.NET ensures that validations are performed on the server side even if they were already performed on the client side. This ensures that validations are not bypassed if a malicious user circumvents client-side validation. If the client-side validation fails, the server-side validation is never performed.
some validator controls are - Requiredfieldvalidator, RangeValidator, CompareValidator, RegularExpressionValidator, CustomValidator, ValidationSummary.you may want to mention about Page.Validate() Method and Page.IsValid Property.
3. Briefly explain what user controls are and what server controls are and the differences between the two.
A user control could simply be an extension of the functionality of an existing server control(s) (such as an image control that can be rotated or a calendar control that stores the date in a text box). Or, it could consist of several elements that work and interact together to get a job done (such as several controls grouped together that gather information about a user's previous work experience).
An ASP.NET control (sometimes called a server control) is a server-side component that is shipped with .NET Framework. A server control is a compiled DLL file and cannot be edited. It can, however, be manipulated through its public properties at design-time or runtime. It is possible to build a custom server control (sometimes called a custom control or composite control).
In contrast, a user control will consist of previously built server controls (called constituent controls when used within a user control). It has an interface that can be completely edited and changed. It can be manipulated at design-time and runtime via properties that you are responsible for creating. While there will be a multitude of controls for every possible function built by third-party vendors for ASP.NET, they will exist in the form of compiled server controls, as mentioned above. Custom server controls may be the .NET answer to ActiveX Web controls.
4. Briefly describe the role of global.asax.
The Global.asax file, also known as the ASP.NET application file, is an optional file that contains code for responding to application-level events raised by ASP.NET or by HttpModules. The Global.asax file resides in the root directory of an ASP.NET-based application. At run time, Global.asax is parsed and compiled into a dynamically generated .NET Framework class derived from the HttpApplication base class. The Global.asax file itself is configured so that any direct URL request for it is automatically rejected; external users cannot download or view the code written within it.
global.asax is responsible for handling higher-level application events such as Application_Start, Application_End, Session_Start, Session_End
5. What is CLR ? Differentiate between CLR & CTS.
Common Language Runtime. The CLR is a set of standard resources responsible for execution of code developed using .NET language. .Net compiler generates intermediate language (IL) which is then compiled using JIT to m/c code. It provides access to common functionalities to all languages via Base Class Libraries. CLR is replacement to win32 APICross-language integration, especially cross-language inheritance. Automatic memory management (garbage collection), which manages object lifetime so that reference counting is unnecessary. Self-describing objects, which make using Interface Definition Language (IDL) unnecessary. The ability to compile once and run on any CPU and operating system that supports the runtime.
Common Language Specification. This is a subset of the CTS which all .NET languages are expected to support. The idea is that any program which uses CLS-compliant types can interoperate with any .NET program written in any language. In theory this allows very tight interop between different .NET languages - for example allowing a C# class to inherit from a VB class.
6. To which namespaces do Trace and Debug belong?
7. To which namespaces does ColumnMapping belong?
[System.Data namespace] [DataColumn class] ColumnMapping
8. DIfferentiate between Friend and Protected Friend.
The five access types are Public, Protected, Friend, Protected Friend, and Private.
Entities declared with the Public modifier have Public access. There are no restrictions on the use of Public entities.
Entities declared with the Protected modifier have Protected access. Protected access can only be specified on members of classes (both regular type members and nested classes) or on Overridable members of standard modules and structures (which must, by definition, be inherited from System.Object or System.ValueType). A Protected member is accessible to a derived class, provided that either the member is not an instance member, or the access takes place through an instance of the derived class. Protected access is not a superset of Friend access.
Entities declared with the Friend modifier have Friend access. An entity with Friend access is accessible only within the program that contains the entity declaration.
Entities declared with the Protected Friend modifiers have the union of Protected and Friend access.
Entities declared with the Private modifier have Private access. A Private entity is accessible only within its declaration context, including any nested entities.
9. What is an abstract class?
Answer - Abstract class is a class that has no direct instances, but whose descendants may have direct instances. There are case i which it is useful to define classes for which the programmer never intends to instantiate any objects; because such classes normally are used as bae-classes in inheritance hierarchies, we call such classes abstract classes These classes cannot be used to instantiate objects; because abstract classes are incomplete. Derived classes called concrete classesmust define the missing pieces.
Note : - Virtual method has an implementation & provide the derived class with the option of overriding it. Abstract method does not provide an implementation & forces the derived class to override the method.
10. Differentiate between Dataset and Recordset.
Answer - Similar to the DataSet, a Recordset could be disconnected from its data store and therefore act as an in-memory cache of data. Of course, it could also be used in a connected model depending on the cursor options that were set. Although the Recordset object stored multiple versions of each column for each of its rows, it was not by nature able to represent multiple tables without the use of the Data Shape Provider. The Recordset was not XML-based and could not be serialized to XML easily or flexibly. Finally, a Recordset was not independent of a data store because it tracked a Connection object and through its methods could send queries to the data source to populate, update, and refresh its data. To that end, the Recordset contained functionality found in the ADO.NET DataSet, data reader, and data adapter objects.
Please rate this post, if it is useful for you.
Thanks & Regards