Asp.Net Interview Questions and Answers
Question - 1 : - What’s the difference between Response.Write() and Response.Output.Write()?
Answer - 1 : - Ans : Response.Output.Write() allows you to write formatted output.
Question - 2 : - Describe the role of inetinfo.exe, aspnet_isapi.dll and aspnet_wp.exe in the page loading process ?
Answer - 2 : - inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests among other things. When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI filter aspnet_isapi.dll takes care of it by passing the request to the actual worker process aspnet_wp.exe.
Question - 3 : - What methods are fired during the page load?
Answer - 3 : - Init() - when the page is instantiated
Load() - when the page is loaded into server memory
PreRender() - the brief moment before the page is displayed to the user as HTML
Unload() - when page finishes loading.
Question - 4 : -
Describe the role of inetinfo.exe,
Answer - 4 : - inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests among other things. When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI filter aspnet_isapi.dll takes care of it by passing the request to the actual worker process aspnet_wp.exe.
Question - 5 : - When during the page processing cycle is ViewState available?
Answer - 5 : - After the Init() and before the Page_Load(), or OnLoad() for a control.
Question - 6 : -
What namespace does the Web page belong in the .NET Framework class hierarchy?
Answer - 6 : -
System.Web.UI.Page
Question - 7 : - What’s the difference between Response.Write() and Response.Output.Write()?
Answer - 7 : -
Response.Output.Write() allows you to write formatted output.
Question - 8 : - Where do you store the information about the user’s locale?
Answer - 8 : - System.Web.UI.Page.Culture
Question - 9 : - What’s the difference between Codebehind="MyCode.aspx.cs" and Src="MyCode.aspx.cs"?
Answer - 9 : - CodeBehind is relevant to Visual Studio.NET only.
Question - 10 : - What data types do the RangeValidator control support?
Answer - 10 : - Integer, String, and Date.