0

Say you have an ASP.NET page that lists the prices for certain items in labels. I know it's cringe-worthy, but say you took the price of the item from the label on the page to determine what the user is charged for their order. Does ASP.NET guarantee in any way that the text in those labels has not been tampered with?

2

Viewstate is what you're looking for.

It secures the page cryptographically, although it has known limitations that are located elsewhere on this site.

An optional MAC should be enabled for sensitive pages, such as yours, that allows the client to post back prices that are used by the business layer.

  • Controls that store values that go through viewstate would be protected, BUT if the control doesn't actually use viewstate for persistence then you're in trouble. It would be worth investigating if Label controls use viewstate. – Steve Jul 8 '14 at 20:31
  • Can't you just set the viewstate property for that label control? – Cameron Verotti Dec 10 '15 at 22:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.