ASP encrypted?

Results 1 to 2 of 2

Thread: ASP encrypted?

  1. #1
    Join Date
    Dec 1969

    Default ASP encrypted?

    Hi,<BR>I was wondering if anyone can help me answer this question?<BR>Thanks!<BR><BR><BR>If you view the source for this site<BR><BR><BR>you&#039;ll see something like the following, except much more of it. Does<BR>anyone know what it&#039;s purpose is?<BR><BR>&#060;form name="test" method="post" action="home.aspx" id="test"&#062; &#060;input<BR>type="hidden" name="__VIEWSTATE"<BR>value="dDwxNjI5MjcyNDg1O3Q8O 2w8aTwxPjs+O2w8dDw7bDxpPDU+O2k8OT47aTwxMT<BR><BR>* ****************<BR>What I know is the following, but the question is,..why should it be<BR>encrypted..?? :<BR><BR>Maintaining the ViewState<BR>When a form is submitted in classic ASP, all form values are cleared.<BR>Suppose you have submitted a form with a lot of information and the server<BR>comes back with an error. You will have to go back to the form and correct<BR>the information. You click the back button, and what happens.......ALL form<BR>values are CLEARED, and you will have to start all over again! The site did<BR>not maintain your ViewState.<BR><BR>When a form is submitted in ASP .NET, the form reappears in the browser<BR>window together with all form values. How come? This is because ASP .NET<BR>maintains your ViewState. The ViewState indicates the status of the page<BR>when submitted to the server. The status is defined through a hidden field<BR>placed on each page with a &#060;form runat="server"&#062; control. The source could<BR>look something like this:<BR><BR>&#060;form name="_ctl0" method="post" action="page.aspx" id="_ctl0"&#062;<BR>&#060;input type="hidden" name="__VIEWSTATE"<BR>value="dDwtNTI0ODU5MDE1Ozs+Z BCF2ryjMpeVgUrY2eTj79HNl4Q=" /&#062;<BR>.....some code<BR>&#060;/form&#062;<BR><BR>Maintaining the ViewState is the default setting for ASP.NET Web Forms. If<BR>you want to NOT maintain the ViewState, include the directive &#060;%@ Page<BR>EnableViewState="false" %&#062; at the top of an .aspx page or add the attribute<BR>EnableViewState="false" to any control.

  2. #2
    Join Date
    Dec 1969

    Default What are you asking?

    Why encrypt the viewstate?<BR><BR>I dunno. So that you can verify that the sending page is one of your own?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts