ASP.NET Interview questions

Total available count: 47
Subject - Microsoft Technologies
Subsubject - ASP.NET

What is view state?

View state is a property of a page and controls to store the values across the round trips. This value will be stored in the form of hashed string in one or more hidden fields that depends on the MaxStateFieldLength property. When the page is posted back to the server, the page parses the view-state string at page initialization and restores property information in the page.

To store the value in the view state.
Viewstate["SlightbookViewState"] = "Slightbook";

To access the value from a view state in the form of string.

string sb = Viewstate["SlightbookViewState"].ToString();



Next 5 interview question(s)

What is the difference between user control and custom control?
Explain about Master pages?
Explain about directives in ASP.NET?
Common properties in all validation controls?
Explain about different validation controls available in ASP.NET?