ms-viewstate

Utility functions for working with VIEWSTATE and EVENTVALIDATION hashes in ASP.NET-generated HTML markup.

ms-viewstate

Utility functions for working with VIEWSTATE and EVENTVALIDATION hashes in ASP.NET-generated HTML markup. See Understanding ASP.NET View State for why Microsoft uses these.

Extract VIEWSTATE hash from markup. Returns null if no hash is found.

Extract EVENTVALIDATION hash from markup. Returns null if no hash is found.

Replace VIEWSTATE hash in markup. Returns unmodified input if no hash is found.

Replace EVENTVALIDATION hash in markup. Returns unmodified input if no hash is found.

Scrub VIEWSTATE and EVENTVALIDATION hashes in markup with the default [scrubbed] or optional second parameter if given.

Licensed under an MIT license.