Solved

Defining ViewState

Posted on 2007-11-28
5
291 Views
Last Modified: 2008-03-06
This is not an exam or homework

The ASP.NET ViewState is a representation of the state of a page when it was last processed on the server. The
ViewState information is stored by default...


1  ...on the server in a Session variable that is unique for each page.
2  ...in a hidden form element as plain text.
3  ...in a hidden form element as a Base64 encoded string.
4  ...in a hidden form element that is encrypted so it cannot be tampered with.
0
Comment
Question by:cybernation989
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 7

Expert Comment

by:bungHoc
ID: 20364153
In your previous question, you've already found a tutorial for RegEx. Why don't you try to red few lines of this page and figure out the answer for yourself:
http://www.w3schools.com/aspnet/aspnet_viewstate.asp
0
 

Author Comment

by:cybernation989
ID: 20364218
Oh sorry I should posted that here... thanks for beating me to it... According to the site the answer could be 3 or 4 but if you really wanted to test 3 out you can to decode it at http://www.motobit.com/util/base64-decoder-encoder.asp 

Since 3 doesnt work the the answer is number 4...

Thanks again BungHoc
0
 
LVL 7

Accepted Solution

by:
bungHoc earned 500 total points
ID: 20364262
Well.. let's do a bit of reasoning here:
1. The view state of a page is, placed in a hidden form field named __VIEWSTATE
Answer 1 is out.

2. If you've taken a look at the page you'll see something like this: <input type="hidden" name="__VIEWSTATE"
value="dDwtNTI0ODU5MDE1Ozs+ZBCF2ryjMpeVgUrY2eTj79HNl4Q=" />
Answer 2 is out.

3. What is the purpose of ViewState? Does ViewState have any sensitive information? -- Don't think so.. However you can still encrypt it if you really want to (I don't remember with what need to look for it).
Answer 4 is out.

That leaves you with answer 3 is the correct one.
0
 

Author Comment

by:cybernation989
ID: 20364302
<--- Bows his head in shame

Like you have posted in the other topic
http://msdn2.microsoft.com/en-us/library/ms972976.aspx

"
Ideally the view state should not need to be encrypted, as it should never contain sensitive information. If needed, however, the LosFormatter does provide limited encryption support.
"

Thank you for correcting me I found http://www.pluralsight.com/blogs/fritz/archive/2004/06/03/408.aspx that goes more into the 64bit encoding
0
 
LVL 7

Expert Comment

by:Infinite_Recursion
ID: 20364687
Is it me or is this starting to sound weird...!!!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Suggested Courses

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question