It seems that after a busy period of time, I had a short rest. I really miss the time last year, after finishing the task assigned by the head, I began to look at my favorite technologies.ArticleAnd do some exercises,
I feel that I have learned many things every day. Now I am responsible for some projects and want to understand the requirements. , Design EDM , As small JS, CSS Nothing can be left behind. My colleagues used to work on moss,
Many things require me to make a sample and let them do it in imitation, for the progress Even if you often work overtime until or later, you still have to finish the work. .
At the beginning of the project, Discussing the framework used, Me Cast Mvc.net One vote, I want to continue with it. When I learned that this project was under my responsibility, I suddenly felt
Body Pressure There are not many functional modules, but there are 10 types of roles, so the logic is still very complicated. I am not very worried about modeling. My previous experiences have made me very confident in modeling.
MVC. net1.0Only released 1 Around a week, except for those articles on the MS official website, few resources were seen, because there were too many preview versions, and each version had some improvements,
But I don't know the differences between those versions and RTM. My side View requirement document , While designing models , Coming off work Do Some MVCOf Exercise , When the framework is set up,
When I started adding the feature, I did not expect an error from the beginning, which left me helpless. An exception occurred when the view Form Verification Failed, Validation of viewstate Mac failed Error
GoogleThe issue is rarely found in MVC applications, but there are many such errors in traditional web programs, as they say 1, 2, 3 .. and try them one by one.
This made me very strange. I found some open source code on codeplex and found out why it still does not seem to have been found. Going home at night, I kept trying to search for different keywords on Google.com and finally saw a positive solution.
Http://www.dotneat.net/2008/12/13/ASPNETMVCValidationOfViewstateMACFailedError.aspx
If you get Validation of viewstate Mac failed Error on ASP. NET MVC , Before trying to hard code your <machinekey attribute in Web. config,
Disabling the keying of viewstate
<System. Web>
<Pages enableviewstatemac = "False" />
</System. Web>
, Or Any other literature You may want to check if the page you are posting data from Has two "<form" attributes
(The one hard coded on the page and the one created with HTML. beginform) If you play with Master templates and have
To merge some MVC pages with Tradicional ASP. NET you may get to that error. Obviously, this section in webconfig is useless. <System. Web>
<Pages enableviewstatemac = "False" />
</System. Web>
Any other literature You may want to check if the page you are posting data from Has two "<form" attributes
(The one hard coded on the page and the one created with HTML. beginform ()). if you play with Master templates and have to merge some MVC pages with Tradicional ASP. net you may get to that error.
This is the main reason why two forms mark nesting. If the form label is retained on the template page, use Html. beginform ()) It is equivalent to nesting two form labels,
When the verification fails, because the Asp.net server-side control is not used and there is no viewstate Validation of viewstate Mac failed Error Therefore, you only need to set the Template
If the form label is removed, it will be normal. Let's look back at the demo'sCodeThis is the case. It's strange that you don't look at things carefully when learning.