Preventing ASP.NET viewstate from being transmitted in querystring via form GET

前端 未结 1 1714
慢半拍i
慢半拍i 2021-01-20 01:58

I believe I have disabled the view state on all controls as well as the page itself, but the querystring still contains the __viewstate and __eventvalidation parameters.

相关标签:
1条回答
  • 2021-01-20 02:39

    Removing the runat="server" attribute from the form tag will effectively remove the hidden viewstate and eventvalidation fields. But then you can't use server controls on the page, so I doubt that's what you want to do.

    Are you sure the __viewstate and __eventvalidation fields appear in your querystring?? That does sound a bit strange.

    Post some code and tell us why you want to remove the hidden fields in the first place. If you disable viewstate on a page-level, the values in the hidden fields should remain relatively small...

    0 讨论(0)
提交回复
热议问题