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 3

21. What is Client side state management?

  • Storing page information using client-side options doesn't use server resources.

  • These options typically have minimal security but fast server performance because the demand on server resources is modest. However, because you must send information to the client for it to be stored, there is a practical limit on how much information you can store this way.

  • The following are the client-side state management options that ASP.NET supports:

View state

Control state

Hidden fields

Cookies

Query strings

 

22. What is View State?

  • View state is the client side state management mechanism provided by ASP.NET to store user's data, i.e., sometimes the user needs to preserve data temporarily after a post back, then the view state is the preferred way for doing it. It stores data in the generated HTML using hidden field not on the server. 

  • View State provides page level state management i.e., as long as the user is on the current page, state is available and the user redirects to the next page and the current page state is lost. View State can store any type of data because it is object type but it is preferable not to store a complex type of data due to the need for serialization and deserilization on each post back.

  • View state is enabled by default for all server side controls of ASP.NET with a property EnableviewState set to true.

 

23. What arethe Advantages & Disadvantages of view state?

Advantages:

  • No Server resources required: The view state is contained in a structure within the page code.

  • Simple implementation: View state does not require any custom programming to use. It is on by default to maintain state data on controls.

  • Enhanced security features: The values in view state are hashed, compressed, and encoded for Unicode implementations, which provides more security than using hidden fields.

 

Disadvantages:

  • It can be performance overhead if we are going to store larger amount of data, because it is associated with page only.

  • Itís stored in a hidden filed in hashed format still it can be easily trapped.

  • It does not have any support on mobile devices.

 

24. What is the lifespan for items stored in ViewState?

  • The items stored in ViewState live until the lifetime of the current page expires including the postbacks to the same page.

 

25. What is the function of the ViewState property?

  • The ASP.NET 4.0 introduced a new property called ViewStateMode for the Control class.

  • Now you can enable the view state to an individual control even if the view state for an ASP.NET page is disabled.

 

26. Where is the ViewState information stored?

  • The ViewState information is stored in the HTML hidden fields.

 

27. Hidden Fields?

  • Hidden field is a control provided by ASP.NET which is used to store small amounts of data on the client.

  • It store one value for the variable and it is a preferable way when a variable's value is changed frequently.

  • Hidden field control is not rendered to the client (browser) and it is invisible on the browser. A hidden field travels with every request like a standard controlís value.

 

28. What are the Advantages & Disadvantages of using hidden fields?

Advantages:

  • No server resources are required: The hidden field is stored and read from the page.

  • Widespread support: Almost all browsers and client devices support forms with hidden fields.

  • Simple implementation: Hidden fields are standard HTML controls that require no complex programming logic.

 

Disadvantages:

  • Potential security risks: The hidden field can be tampered with. The information in the hidden field can be seen if the page output source is viewed directly, creating a potential security issue.

  • Simple Storage architecture:  The hidden field does not support rich data types. Hidden fields offer a single string value field in which to place information.

  • Performance Considerations: Because hidden fields are stored in the page itself, storing large values can cause the page to slow down when users display it and when they post it.

  • Storage limitations: If the amount of data in a hidden field becomes very large, some proxies and firewalls will prevent access to the page that contains them. Because the maximum amount can vary with different firewall and proxy implementations, large hidden fields can be sporadically problematic.

 

29. What is Cookies?

  • A cookie is a small piece of text stored on user's computer. Usually, information is stored as name-value pairs.

  • Cookies are used by websites to keep track of visitors. Every time a user visits a website, cookies are retrieved from user machine and help identify the user. 

  • Most browsers support cookies of up to 4096 bytes. Because of this small limit, cookies are best used to store small amounts of data, or better yet, an identifier such as a user ID. The user ID can then be used to identify the user and read user information from a database or other data store.

 

30. What is the default timeout for a Cookie?

  • The default time duration for a Cookie is 20 minutes.

 

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-3.php on line 300

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-3.php on line 300

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-3.php on line 306

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-3.php on line 306