Hi,
Please someone explain me what is viewstate and postback properties in simple words. I have sean many notes but still confused. Please explain with example and considering me as totaly new to IT (actually i am not). Please help i am very confused. Thank you.

I have this link actually bookmarked in my browser and have referred to it a few times.
http://msdn.microsoft.com/en-us/library/ms972976.aspx

From my understanding in simple terms, the purpose of viewstate is to carry information over from one page to another during a postback. For example, when a user clicks a submit button, and you assign certain properties during that event (modifying a textbox, label, etc...), you need for that information you assigned to be available when the new page is loaded. If you didnt have viewstate available, you would have to assign that information to a session variable or store it somewhere else.

Means as irctc site were user fills all the details on first page and when he clicks on next at that time all train details entered is saved in viewstate so that on next page fare is automaticaly calculated according to train selected and class and stations.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.