Set - 4

Question 1 :

Describe session handling in a webfarm, how does it work and what are the limits?

Answer :

Set the sessionState mode in the web.config file to "StateServer".
StateServer mode uses an out-of-process Windows NT Server to store state information.
It solves the session state loss problem in InProc mode.
Allows a webfarm to store session on a central server.
It provides a Single point of failure at the State Server.

Follow these simple steps:
- In a web farm, make sure you have the same in all your web servers.
- Also, make sure your objects are serializable.
- For session state to be maintained across different web servers in the web farm, the Application Path of the website in the IIS Metabase should be identical in all the web servers in the web farm.

Question 2 :

What are the disadvantages of viewstate/what are the benefits?

Answer :

Disadvantage of viewstate is that additional data is sent to the browser. The benefits are that you do not have to manually manage refreshing the page fields after a submit, (when re-displaying the same page).

Automatic view-state management is a feature of server controls that enables them to repopulate their property values on a round trip (without you having to write any code). This feature does impact performance, however, since a server controls view state is passed to and from the server in a hidden form field. You should be aware of when view state helps you and when it hinders your pages performance.

Question 3 :

What tags do you need to add within the asp:datagrid tags to bind columns manually?

Answer :

Set AutoGenerateColumns Property to false on the datagrid tag

tag and either or tags (with appropriate attributes of course)

Question 4 :

What is State Management in .Net and how many ways are there to maintain a state in .Net? What is view state?

Answer :

Web pages are recreated each time the page is posted to the server. In traditional Web programming, this would ordinarily mean that all information associated with the page and the controls on the page would be lost with each round trip.
To overcome this inherent limitation of traditional Web programming, the ASP.NET page framework includes various options to help you preserve changes — that is, for managing state. The page framework includes a facility called view state that automatically preserves property values of the page and all the controls on it between round trips.
However, you will probably also have application-specific values that you want to preserve. To do so, you can use one of the state management options.
Client-Based State Management Options:
View State
Hidden Form Fields
Query Strings
Server-Based State Management Options
Application State
Session State
Database Support

Question 5 :

What tag do you use to add a hyperlink column to the DataGrid?

Answer :

Depends on whos definition of hyperlink your using. Manually a std html anchor tag (a) will work or you can use the micro-magical tag