Questions tagged [viewstate]

ViewState is the mechanism that allows form field values to be preserved across page postbacks.

View state refers to the page-level state management mechanism utilized by component based frameworks, such as Microsoft and , Oracle and so on.

References

1589 questions
10
votes
1 answer

How does a Panel's DefaultButton property work?

What is happening when you declare a Button to be used as the DefaultButton in an ASP.NET Panel? I understand that ASP.NET will render the contents of the Panel to a div and pass a bunch of stuff to the ViewState. Is there JavaScript inside the…
notAnonymousAnymore
  • 2,637
  • 9
  • 49
  • 74
10
votes
4 answers

Which is best to use ViewState or hiddenfield

I have a page in which I want to maintain the value of object between post backs. I am thinking of two ways to maintain the value of objects Store the value in View Sate Store the value in hidden field which is best option to use based on…
Vijjendra
  • 24,223
  • 12
  • 60
  • 92
10
votes
6 answers

How to minimize viewstate size of a page in asp.net?

How to minimize viewstate size of a page in asp.net? Please help.
Himadri
  • 8,600
  • 15
  • 47
  • 70
10
votes
8 answers

ASP.NET: Unable to validate data

What is the cause of this exception in ASP.NET? Obviously it is a viewstate exception, but I can't reproduce the error on the page that is throwing the exception (a simple two TextBox form with a button and navigation links). FWIW, I'm not running…
wprl
  • 24,489
  • 11
  • 55
  • 70
10
votes
4 answers

Maintaining viewstate in Asp.net mvc?

One of the major reasons for using webforms is the ease of being able to maintain viewstate. I would like to build an asp.net mvc application so what options do I have for maintaining viewstate? Kind regards
Goober
  • 13,146
  • 50
  • 126
  • 195
10
votes
3 answers

Large ViewState value in ASP.NET

I am building an application in ASP.NET 2.0 and the value for the view state is huge:
Jaelebi
  • 5,879
  • 8
  • 32
  • 34
10
votes
5 answers

Is it possible to decode EventValidation and ViewState in ASP.NET?

How to decode the ASP.NET EventValidation and ViewState?
Zanoni
  • 30,028
  • 13
  • 53
  • 73
9
votes
4 answers

ASP.NET MVC - Is there a way to simulate a ViewState?

I have the following situation... In a certain View, the user must select the initial hour, the final hour and the weekday. But, I can't save this informations to DB 'cause I need to save my whole page and I need the primary key of the primary…
André Miranda
  • 6,420
  • 20
  • 70
  • 94
9
votes
5 answers

Validation of viewstate MAC failed when on page for 20+ minutes

If you open a web page on one of the websites hosted on our server, leave it for 20 minutes and then submit a form, a Validation of viewstate MAC failed. error occurs. What possible reasons could there be for this?
Curtis
  • 101,612
  • 66
  • 270
  • 352
9
votes
6 answers

ASP.net ViewState - Even when disabled, some viewstate exist. Why?

Even when on the page, the EnableViewState property is disabled, I am still seeing some viewstate existing on the page: "
TimLeung
  • 3,459
  • 6
  • 42
  • 59
9
votes
4 answers

PHP curl - posting asp.net viewstate value

I have the following code to login into an external site application (asp.net app) from a local site login form (written in php):
Mark Jones
  • 101
  • 1
  • 1
  • 6
9
votes
4 answers

Why does asp.net wrap the page in a form?

I'm a PHP developer who has to work on ASP.net projects and I'm wondering why every page is wrapped in a form. This just doesn't make sense to me. Also What's with all the hidden input fields especially the "View State" one.
Emily Laguna
  • 636
  • 1
  • 8
  • 13
9
votes
1 answer

AngularJS: ui-router Redirect view on success & refresh scope with new contents

I am migrating from ng-view to ui-view. In my controller, upon successful create / update / delete, I would like to redirect to an index view with the newly updated / created / deleted data. I currently do this using…
Gravy
  • 12,264
  • 26
  • 124
  • 193
9
votes
4 answers

Why does DropDownList.SelectedValue is relied on viewstate?

If I set on my page : EnableViewState="true" ViewStateMode="Disabled" - Then - the Viewstate is disable for the page ( unless override...) Then, trying to read from (assuming the control has been populated in the last dump to the screen and a value…
Royi Namir
  • 144,742
  • 138
  • 468
  • 792
9
votes
1 answer

Why is the __VIEWSTATE hidden input element surrounded by
?

Why does ASP.NET render the hidden __VIEWSTATE input element within
?
Agnel Kurian
  • 57,975
  • 43
  • 146
  • 217