Im setting the value of a hidden with tempData, but the value is always overridden on postback. Whats the problem?
On postback, all input helpers — including hidden — render the value that’s in ModelState rather than the value that’s provided from ViewData or the helper method. The assumption is that if you’re re-rendering the form on postback, then it’s because there was an error, and we should show the values the user typed rather than the values in the object. See http://forums.asp.net/p/1476843/3460584.aspx In your controller action, you could remove the hidden value from ModelState to force it to use the new value.