Q. How to invoke garbage collector programmatically in asp.net?
A. To call garbage collector for a program, use the code line "GC.Collect();".
Q. What's the use of Response.Output.Write()?
A. We can write formatted output using Response.Output.Write() on asp.net applications to get instant output on screen.
Q. In which event of page cycle ViewState is available in c# asp.net web applications?
A. in betweeeb After the Init() and before the Page_Load().
Q. What is the difference between Server.Transfer and Response.Redirect?
A. 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.
Q. which base class all Web Forms are inherited?
A. Page class.
Q. What are the different validators in ASP.NET?
A. Required field Validator
Range Validator
Custom Validator
Compare Validator
Regular expression Validator
Summary Validator.