我正在嘗試根據HTML5規範創建一個隱藏表單,其中隱藏屬性沒有使用值。現在,我不知道如何將其強行進入asp.net MVC的asp.net mvc htmlattribute without value
<% Html.BeginForm("ChangeContent", "Content", FormMethod.Post, new {hidden}); %>
方法與上面一個不
Compiler Error Message: CS0103: The name 'hidden' does not exist in the current context
任何人知道出路編譯?
編輯
只是出於使用默認的HTML輔助好奇心?
我認爲最好是使用常規的Html而不是Html助手,最後最終編寫相同數量的代碼,而且我看不到從助手獲得的好處。 – 2010-11-09 16:50:33