Monday, April 14, 2008

Asp.Net Interview Questions

Explain the differences between Server-side and Client-side code?
Server-side code executes on the server. Client-side code executes in
the context of the clients' browser.

What are some ways to manage state in an ASP.Net application?
Session objects, Application objects, ViewState, cookies, hidden form fields.

What does the "EnableViewState" property do? Why would I want it on or off?
It allows page objects to save their state in a Base64 encoded string in the page
HTML. One should only have it enabled when needed because it adds to the
page size and can get fairly large for complex pages with many controls.
(It takes longer to download the page).

What is the difference between Server.Transfer and Response.Redirect? Why
would I choose one over the other?
Server.Transfer transfers excution directly to another page. Response.Redirect
sends a response to the client and directs the client (the browser) to load the
new page (it causes a roundtrip). If you don't need to execute code on the client,
Transfer is more efficient.

How can I maintain Session state in a Web Farm or Web Garden?
Use a State Server or SQL Server to store the session state.

base class do all Web Forms inherit from?
The Page class.

What does WSDL stand for? What does it do?
(Web Services Description Language). It describes the interfaces and
other information of a web service.

Which WebForm Validator control would you use if you needed to make
sure the values in two different WebForm controls matched?
CompareValidator Control

What property must you set, and what method must you call in your code,
in order to bind the data from some data source to the Repeater control?
You must set the DataSource property and call the DataBind method.

No comments: