ASP.NET

1. ASP.NET Introduction 2. Comp of .Net Framework 3.5 3. Sys.Req for VS 2008 4. ASP.NET Envrmnt Setup 5. VS2010 Ultimate Sys.Req 6. Installing VS 2010 7. VS 2012 Sys.Req 8. Installing VS Exp 2012 9. Start the VS 2008 10. Application Life Cycle 11. Page Life Cycle 12. Page Life Cycle Events 13. ASP.NET Example 14. Event Handling 15. Default Events 16. Server Side 17. Request Object 18. Response Object 19. Server Controls 20. Server Controls Properties 21. Server Controls Methods 22. HTML Server Controls 23. Client Side 24. ASP.NET Basic Controls 25. TextBox Control 26. CheckBox Controls 27. RadioButton Controls 28. ListBox Control 29. HyperLink Control 30. Image Control 31. BulletedList Control 32. ASP.NET Directives 33. Implements Directive 34. Master Type Directive 35. Page Directive 36. PreviousPage Type 37. Managing State 38. Control State 39. Cookies 40. Query Strings 41. Server-Side State 42. Session State 43. Validation Controls 44. Required FieldValidator 45. Range Validator 46. Compare Validator 47. RegularExpressionValidator 48. Custom Validator 49. Validation Summary 50. Data Source Control 51. AdRotator Control 52. Calendar Control 53. Calendar Control Example 54. Panel Control 55. Panel Control Example 56. Multi Views Control 57. MultiView & View controls 58. MultiView Control Example 59. FileUpload Control 60. FileUpload Control Eg 61. AJAX Control 62. UpdatePanel control 63. UpdateProgress Control 64. Custom Controls 65. Custom Control Eg 66. Personalization 67. Create Simple Profile 68. ADO.NET 69. ADO.NET Objects 70. DataTable 71. DataRow 72. DataColumn 73. Object Example 74. Error Handling 75. Tracing Errors 76. Debugger 77. Security 78. Authentication 79. Authorization 80. LINQ 81. LINQ Query Operators 82. LINQ Example 83. Caching 84. Data Caching 85. Output Caching 86. Object Caching 87. Web Services 88. Create Web Services Eg 89. Web & Machine.config 90. Settings Schema 91. ASP.NET Deployment 92. XCopy Deployment 93. Web Setup Project 94. ASP Interview Part 1 95. ASP Interview Part 2 96. ASP Interview Part 3 97. ASP Interview Part 4 98. ASP Interview Part 5 99. ASP Interview Part 6
Pr.Pg Next Pg

ASP.Net Interview Questions and Answers Part 5

 

41. Disadvantage of using session state are:

  • Performance Overhead   Performance overhead in case of large volumes of data/user, because session data is stored in server memory.

 

42. How can you display all validation messages in one control?

  • The ValidationSummary control displays all validation messages in one control.

 

43. Which method is used to force all the validation controls to run?

  • The Page.Validate() method is used to force all the validation controls to run and to perform validation.

 

44. Differentiate between client-side and server-side validations in Web pages.

  • Client-side validations take place at the client end with the help of JavaScript and VBScript before the Web page is sent to the server.

  • On the other hand, server-side validations take place at the server end.

 

45. What are HTTP handlers in ASP.NET?

  • HTTP handlers, as the name suggests, are used to handle user requests for Web application resources.

  • They are the backbone of the request-response model of Web applications.

  • There is a specific event handler to handle the request for each user request type and send back the corresponding response object.
    Each user requests to the IIS Web server flows through the HTTP pipeline, which refers to a series of components (HTTP modules and HTTP handlers) to process the request.

  • HTTP modules act as filters to process the request as it passes through the HTTP pipeline.

  • The request, after passing through the HTTP modules, is assigned to an HTTP handler that determines the response of the server to the user request.

  • The response then passes through the HTTP modules once again and is then sent back to the user.
    You can define HTTP handlers in the <httpHandlers> element of a configuration file.

  • The <add> element tag is used to add new handlers and the <remove> element tag is used to remove existing handlers.

  • To create an HTTP handler, you need to define a class that implements the IHttpHandler interface.

 

46. What are the events that happen when a client requests an ASP.NET page from IIS server?

  • The following events happen when a client requests an ASP.NET page from the IIS server:

  • User requests for an application resource.

  • The integrated request-processing pipeline receives the first user request.

  • Response objects are created for each user request.

  • An object of the HttpApplication class is created and allocated to the Request object.

  • The HttpApplication class processes the user request.

 

47. Describe the complete lifecycle of a Web page.

When we execute a Web page, it passes from the following stages, which are collectively known as Web page lifecycle:

  • Page request - During this stage, ASP.NET makes sure the page either parsed or compiled and a cached version of the page can be sent in response

  • Start - During this stage sets the Request and Response page properties and the page check the page request is either a postback or a new request

  • Page Initialization - During this stage, the page initialize and the control's Unique Id property are set

  • Load - During this stage, if the request is postback, the control properties are loaded without loading the view state and control state otherwise loads the view state

  • Validation - During this stage, the controls are validated

  • Postback event handling - During this stage, if the request is a postback, handles the event

  • Rendering - During this stage, the page invokes the Render method to each control for return the output

  • Unload - During this stage, when the page is completely rendered and sent to the client, the page is unloaded.

 

 

48. What are the major built-in objects in ASP.NET?

  • The major built-in objects in ASP.NET are as follows:

  • Application

  • Request

  • Response

  • Server

  • Session

  • Context

  • Trace

 

49. Where should the data validations be performed-at the client side or at the server side and why?

  • Data validations should be done primarily at the client side and the server-side validation should be avoided because it makes server task overloaded.

  • If the client-side validation is not available, you can use server-side validation.

  • When a user sends a request to the server, the validation controls are invoked to check the user input one by one.

 

 

50. What does the "EnableViewState" property do? Why do we want it On or Off?

  • The EnableViewState property enables the ViewState property on the page.

  • It is set to On to allow the page to save the users input between postback requests of a Web page; that is, between the Request and corresponding Response objects.

  • When this property is set to Off, the page does not store the users input during postback.

 


Pr.Pg border                                              Next Pg

Warning: include_once(bottompad.php) [function.include-once]: failed to open stream: No such file or directory in D:\INETPUB\VHOSTS\cbtsam.com\httpdocs\asp-tutorials\asp-tutorials-asp-interview-part-5.php on line 317

Warning: include_once() [function.include]: Failed opening 'bottompad.php' for inclusion (include_path='.;C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\pear;./includes;./pear') in D:\INETPUB\VHOSTS\cbtsam.com\httpdocs\asp-tutorials\asp-tutorials-asp-interview-part-5.php on line 317

Warning: include_once(rightpad.php) [function.include-once]: failed to open stream: No such file or directory in D:\INETPUB\VHOSTS\cbtsam.com\httpdocs\asp-tutorials\asp-tutorials-asp-interview-part-5.php on line 323

Warning: include_once() [function.include]: Failed opening 'rightpad.php' for inclusion (include_path='.;C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\pear;./includes;./pear') in D:\INETPUB\VHOSTS\cbtsam.com\httpdocs\asp-tutorials\asp-tutorials-asp-interview-part-5.php on line 323