Briefly explain how server form post-back works (perhaps ask about view state as well).

Showing Answers 1 - 3 of 3 Answers

vasant

  • Apr 27th, 2005
 

can u give me answer for this question 
ur questions are for useful for us during the interviews 
thank u 
vasant

  Was this answer useful?  Yes

vvbabu

  • Jul 31st, 2005
 

Post Back: 
 
The process in which a Web page sends data back to the same page on the server. 
 
View State: 
 
ViewState is the mechanism ASP.NET uses to keep track of server control state values that don't otherwise post back as part of the HTTP form. 
 
ViewState Maintains the UI State of a Page 
ViewState is base64-encoded. 
It is not encrypted but it can be encrypted by setting EnableViewStatMAC="true" & setting the machineKey validation type to 3DES. 
If you want to NOT maintain the ViewState, include the directive < %@ Page EnableViewState="false" % > at the top of an .aspx page or add the attribute EnableViewState="false" to any control.

  Was this answer useful?  Yes

Whenever the client requests a webpage the postback is false meaning that there is no processing of the user interface being in question.  When once the WebPage is retreived and some changes are being made or data being entered done there will be a post back to the same page or a new page when a button control is clicked or some other change occur in a control whose AutoPostBack property is set true.  Button by default has AutoPostBack as true.  AutoPostBackUrl of the Button control enables the user to redirect to a new webpage.

When the page is posted back to the same webpage and viewstate property of the control is enabled to true a hidden value is created for the id of the control.  This id stores the value of the control in the same Postback so that the data of the control is not lost during Postback (as http is a state less protocol and does not store values during Postbacks).  By default hidden values are created for Textbox controls.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions