Asp Dot Net Interview Questions


Q#1. What is ASP?

Ans. ASP stands for Active Server Pages. It is also known as classic ASP. It is a server-side technology provided by Microsoft which is used to create dynamic and user-friendly web pages. It uses different scripting languages to create dynamic web pages which can be run on any browsers.


Q#2. What is ASP.Net?

Ans. It is a framework developed by Microsoft on which we can develop new generation web sites using web forms(aspx), MVC, HTML, Javascript, CSS etc. Its successor of Microsoft Active Server Pages(ASP). Currently there is ASP.NET 4.0, which is used to develop web sites. There are various page extensions provided by Microsoft that are being used for web site development. Eg: aspx, asmx, ascx, ashx, cs, vb, html, XML etc.


Q#3. What is the difference between the ASP and ASP.NET?

Ans. The main difference between ASP and ASP.Net is that ASP is interpreted, while ASP.Net is compiled. ASP uses VBScript, therefore when the ASP page is executed, it is interpreted. On the other hand, ASP.Net uses .Net languages like C# and VB.NET, which is compiled to Microsoft intermediate language.


Q#4. What is IIS? Why do we use it?

Ans. Internet Information Server by Microsoft with its own Operating System. It is used to execute web-page scripts.


Q#5. What's the use of Response.Output.Write()?

Ans. We can write formatted output using Response.Output.Write().


Q#6. What is a multilingual website?

Ans. If a website provides content in many languages, it is known as a multilingual website. It contains multiple copies of its content and other resources, such as date and time, in different languages.


Q#7. What is Cross Page Posting? How is it done?

Ans. By default, ASP.NET submits a form to the same page. In cross-page posting, the form is submitted to a different page. This is done by setting the ‘PostBackUrl’ property of the button(that causes postback) to the desired page. In the code-behind of the page to which the form has been posted, use the ‘FindControl’method of the ‘PreviousPage’ property to reference the data of the control in the first page.


Q#8. What are the different validators in ASP.NET?

Ans. Required field Validator Range Validator Compare Validator Custom Validator Regular expression Validator Summary Validator


Q#9. What is the concept of Postback in ASP.NET?

Ans. Postback is a request which is sent from a client to the server from the same page user is working with. There is an HTTP POST request mechanism in ASP.NET. It posts a complete page back to the server to refresh the whole page.


Q#10. What is the difference between Server.Transfer and Response.Redirect?

Ans. In Server.Transfer page processing transfers from one page to the other page without making a round-trip back to the client's browser. This provides a faster response with a little less overhead on the server. The clients url history list or current url Server does not update in case of Server.Transfer. Response.Redirect is used to redirect the user's browser to another page or site. It performs trip back to the client where the client's browser is redirected to the new page. The user's browser history list is updated to reflect the new address.