Asp.net Interview Questions and Answers
What is ASP.Net? What are the advantages ASP.Net Technologies?
ASP.Net is a server side Technology to develop a web based applications.ASP.Net will make use of .Net framework features.
Advantages of ASP.Net
- ASP.NET makes development simpler and easier to maintain with an event-driven, server-side programming model
- ASP.NET offers built-in security features through windows authentication or other authentication methods.
- Content and program logic are separated which reduces the inconveniences of program maintenance.
- Built-in caching features.
What are different stages of ASP.Net Page Life cycle?
Each ASP.Net Web page performs following stages/events
- Page Initialization (Page_Init event)
- Page Loading (Page_Load event)
- Page Prerender (Page_Prerender)
- Page Render (Page_Render)
- Page Unload (Page_Unload)
How do you validate Input data on web page?
Before submitting a web page to server, Input validation on web page is one of the important task.ASP.Net provides below validation controls to validate data in web controls and shows user friendly Messages to the user.
ASP.Net validation Controls
- Required field validator control
- Compare validator control
- Range Validator Control
what are the different state management techniques in ASP.Net?
Asp.Net state management can be maintained in two ways as below
Client- Side State Management
ASP.Net provides following techniques to store state information. This will improve application performance by minimizing server resource utilization
2. Hidden Fields
4. Query Strings
Server – Side State Management
With respect to Server Side State Management ASP.Net uses “Application state” and “Session state” objects to store data or user state.
What are the differences between custom Web control and user control?
Custom Web control is a control that inherits from web server control available in ASP.Net.
A Custom Web Control could be compiled into separate .dll file. This custom Web control can be shared across all application by installing this dll in to Global Assembly Catch.
User Control is a file (.ascx file) that contains a set of ASP.Net controls and code grouped together to provide common functionality across the application. User control can be used on different web pages of the application.
Explain ASP.Net Catching? What are different catching mechanisms available in ASP.Net?
ASP.Net catching one of the important performance factor for large web applications.
ASP.Net Catching stores frequently accessed data in to catch object.
There are two different types catching in ASP.Net
2.Page Output Catching
Asp.net validation controls interview questions
What is role of validation controls in webpage?
Validation controls helps to check Web form data entries before the data is accepted and saved in the Database.
The validation controls check the validity of data entered in associated server controls on the client before the page is posted back to the server.
Most validity problems can be caught and corrected by the user without a round-trip to the server.
What are the different validation controls available in ASP.Net?
RequiredFieldValidator: Verifies whether a control contains data
CompareValidator: Verifies whether an entered item matches an entry in another control
RangeValidator: Verifies whether an entered item is between two values
RegularExpressionValidator: Verifies whether an entered item matches a specified format
CustomValidator: Verifies the validity of an entered item using a client-side script or a server-side code, or both
ValidationSummary: Displays validation errors in a central location or display a general validation error description
Where do the ASP.NET validation controls validate data, on the Client or on the Web Server?
ASP.NET validation controls validate data on the client as well as web server. If we need to validate data on client side itself, we have to set a property to controls to execute at the client side.