If you ever find the need to suppress the ViewState hidden field in ASP.NET, you're in for a world of pain :)  There are various blog posts that discuss the issue but none give clean and easy server-side solutions - that is unless you really want to take over the http stream and start tag stripping.

There is a very quick and admittedly dirty client-side way of doing it in DHTML:

<script language="javascript">
 document.getElementById('__VIEWSTATE').parentNode.removeChild(document.getElementById('__VIEWSTATE'));
</script>

Yes I know. Yuk. Works in IE6/7 and Firefox tho!


Bookmark with :
Digg It! DZone StumbleUpon Technorati Reddit Del.icio.us Newsvine Furl Blinklist
posted @ Friday, September 14, 2007 2:42 PM | in .NET/C#

Comments

No comments posted yet.

Post Comment

Title *
Name *
Email
Url
Comment *  


Please add 5 and 4 and type the answer here: