views:

225

answers:

3

Is there an easy way to simulate Invalid Viewstate?

+6  A: 

Sure: just add a simple javascript function to the page to modify the hidden __VIEWSTATE input.

Joel Coehoorn
+2  A: 

You can also use fiddler

It can simulate a postback very easily and you can modify that post.

John Sonmez
+1  A: 

Here's a jQuery way to implement Joel's suggestion:

<script language="javascript">
$(document).ready(function() {
    jQuery('input[@name=__VIEWSTATE]').val("this is now bad");
});
Macho Matt