Q. Where viewstate is stored after the page postback done?
A. ViewState is stored in a hidden field on the page at client side. ViewState is transported to the client and back to the server, and is not stored on the server or any other external source.
Q. How long the items in ViewState exists on Client-Side?
A. ViewState in asp.net web application exist for the current page life time till page alive on the client-side browser.
Q. Explain the types of comments in C# asp.net?
A. Here are the types of comments in C#
Single Line Comment Eg : // (will use this wherever comment the line)
Multiline Comments Eg: /* */ (for multi line starting and ending lines will use this)
XML Comments Eg : ///
Q. Explain sealed class in C# asp.net web applications?
A. Sealed class is used to prevent the class from being inherited from other classes. So “sealed” modifier also can be used with methods to avoid the methods to override in the child classes.
Q. Explain the differences between Array and ArrayList in C#?
A. Array stores the values or elements of same data type but arraylist stores values of different datatypes.
Arrays will use the fixed length but arraylist does not uses fixed length like array.
Q. Why to use “using” in C# asp.net?
A. “Using” statement calls – “dispose” method internally, whenever any exception occurred in any method call and in “Using” statement objects are read only and cannot be re-assignable or modifiable.