1.What is the difference between Classic ASP and ASP.NET?
1. ASP.Net is a server side scripting technology that enables scripts(embedded in web pages) to be executed by an Internet server.
2. It is compile languages.
2.What is a PostBack?
Ans. The process in which a Web page sends data back to the same page on the server.
3.What is AutoPostBack?
If you want a control to postback automatically when an event is raised, you need to set the AutoPostBack property of the control to True.
4.What is a round trip?
The trip of a web page from the client to the server and then back to the client is known as round trip.
5.What are the types of Cookies in Asp.Net?
There are two types of Cookies available in Asp.Net:
· Session Cookie (Resides on the client machine for a single session until the user does not log out.)
· Persistent Cookie (Resides on a user’s machine for a period specified for its expiry, such as 10 days, One month and never. The user can set this period manually
6.Which is the parent class of the web server control?
Ø The System.Web.UI.Control class is the parent class for all Web server controls.
7.Which Asp.net objects encapsulate the state of the client and the browser?
The Session object encapsulates the state of the client and browser
8.What is the difference between Custom Control and User Control?
Custom Controls are compiled code(Dlls), easier to use, difficult to create and can be placed in toolbox. Drag and Drop controls.
User Controls are similar to those of Asp include files, easy to create, can not be places in the toolbox and dragged-dropped from it.
9.How can you identify that the page is Postback?
The Page object uses the IsPostBack property to check whether the page is posted back or not. If the page is postback, this property is set to true.
10.What is ViewState?
ViewState is a .Net mechanism to store the posted data among post backs.
ViewState allows the state of objects to the stored in a hidden field on the page, saved on client side and transported back to server whenever required.
11.What is Authentication and Authentication and Authorization?
Authentication is the process of identifying users. Authentication is identifying/validating the user against the user against the credentials (username and password) and Authorization performs after authentication.
Authorization is the process of granting access to those users based on identity. Authorization allowing access of specific resource to user.
12.What are the types of Authentication?
There are 3 types of Authentication. Windows, Forms and Password Authentication
Windows Authentication uses the security features integrated into the Windows NT and Windows XP Operating systems to authenticate and authorize Web application users.
Forms authentication allows you to create your own list/database of users and validate the identity of those users when they visit your Web site.
Passport authentication uses the Microsoft centralized authentication provider to identify users. Password provides a way to for users to use a single identity across multiple Web applications. To use Passport authentication in your Web application, you must install the Passport SDK.
13.What are the different ways to send data across pages in Asp.Net?
2. Public Properties
14.Where is the ViewState Information stored?
The ViewState Information is stored in the HTML hidden fields.
15.What are different types of directives in .Net?
16.What is the default timeout for a cookie?
The default time duration for a cookie is 30 minutes.
17.What is the difference between HTML and Web Server controls?
HTML controls are client side controls therefore; all the validations for HTML controls are performed at the client side. On the other hand, Web server controls are server side controls; therefore, all the validations for Web server controls are performed at the server side.
18.What is the difference between Server-side scripting and Client-Side scripting?
Server Side Scripting means that all the script will be executed by the server and interpreted as needed. Asp doesn’t have some of the functionality like sockets, uploading, etc.
19.Which method do you use to redirect the user to another page without performing a round trip to the client?
20.How Many languages .Net is supporting now?
When .Net was introduced it came with several languages. VB.NET, C#, COBOL and Perl, etc the Site DotNetLanguages.Net says 44 languages are supported.
21.What is smart navigation?
The cursor position is maintained when the page gets refreshed due to the server side validation and the page gets refreshed.
22.How do you validate the controls in a ASP.Net page?
Using special validation controls that are meant for this. We have Range Validator, Email validator.
23.How do you turn off cookies for one page in your site?
Use Cookie.Discard property, Gets or Sets the discard flag set by the server. When true, this property instructs the client application not to save the cookie on the user’s hard disk when a session ends.
24.Which two properties are on every validation control?
1. Control to Validate
2. Error Message
25.What are the event handlers that can be included in the Global.asax file?
The Global.asax file contains some of the following important event handlers:
26.What Asp.Net objects encapsulate the state of the client and the browser?
The Session object.
27.Which class is inherited when an Asp.Net server control is added to a web form?
System.Web.UI.Webcontrols class is inherited when and ASP.NET Server controls is added to a web form.
What are the types of validation controls in Asp.Net?
1. There are six types of validation controls in Asp.net
2. Compare Validator
3. Custom validator
4. Range Validator
5. Regular Expression Validation
6. RequiredField Validator
7. Validation Summary.
28.How can you display all validation messages in one control?
The ValidationSummary control displays all validation messages in one control
29.IN Which event are the controls fully loaded?
Page_Load event guarantees that all controls are fully loaded. Controls are also accessed.
IN Page_Init events but will see that viewstate is not fully loaded during this event.
30.What is the use of @Register directives?
@Register directive informs the compiler of any custom server control added to the page.
It checks whether the control have any value. It’s used when you want the control should not be empty.
32.Different types of Session state management options available with ASP.NET?
1. Asp.Net provides In-Process and Out-of-Process state management. In-Process stores the session in memory on the web server. Out-Of-Process Session state management stores data in and external data source. The external data source may be either a SQL Server or a State Server Service. Out-Of-Process State management requires that all objects stored in session are serializable.
33.What is the diff between ASP Session and ASP.NET Session?
Asp.Net session supports cookie less session & it can span across multiple server.
34.What is the function of Custom Validator?
It uses the customized validation code to perform client side validation and server side validation.
35.What data type does the RangeValidator control support?
36.What is Role based security?
A Role is a named set of principals that have the same privileges with respect to security (such as a teller or a manager). A principal can be a meber of one or more roles. Therefore, applications can use role membership to determine whether a principal is authorized to perform a requested action.
37.What base class do all web Forms inherit from?
38.How to Manage State in Asp.Net?
39.What is a Literal Control?
The Literal control is used to display text on a page. The text is programmable. This control does not let you apply styles to its content.
40.Which namespaces are used for data access?
41.What is Remoting?
Remoting is a means by which one operating system process, or program, can communicate with another process. The two processes can exist on the same computer or on two computers connected by a LAN or the Internet.
42.What is the use of Global.Asax file?
It allows to executing Asp.Net application level events and setting application-level variables.
43.What is a Session and Application objects?
Session object store information between HTTP requests for a particular user. Session variables are used to store user specific information where as in application variables we can’t store user specific information. While application object are global across users.
|Top 20 Interview questions on REST API|
|Basic ASP.NET - .NET Interview Questions and Answers II|
|Basic ASP.NET - .NET Interview Questions and Answers|
|Asp.Net, C# Interview Questions and Answers Set 3|
|Asp.Net Interview Questions and Answers Set 2|
|Sql Interview questions and Answers Set-1|
|Asp.Net Interview Questions and Answers Set-1|
|Why Use a DBMS?|
|What exactly is happening when we make a field a primary key?|
|Jquery Interview Questions Answers Set-1|
|ASP.NET Security Impersonation Interview Question And Answers For 2-5 Years Experienced|
|Asp.Net State Management/Session Interview Questions Answers|
|ASP.NET VIEW State Interview Questions and Answers 2-4 Years Experienced|
|ASP.NET Web.Config Interview Questions & Answers|
|How many types of memories are there in .net?|
|Which is the parent class of the Web server control?|
|Update a table using JOIN in SQL Server?|
|Types of Constructors in C#|
|What is the difference between HTML and Web server controls?|
|In which event are the controls fully loaded?|
|What is the life for items stored in ViewState?|
|How can we identify that the Page is Post Back?|
|What is the basic difference between ASP and ASP.NET?|
|What is an ajaxError() in jquery?|
|How we find loop in Linked List?|
|What are the different ways to deploy a assembly ?|
|Which is the common property in every Validation control ?|
|By default where the sessions ID's are stored ?|
|ASP.Net MVC Interview Questions Objective Part 1|