我創建了一個MVC-3應用程序(一旦我們創建它,我們就會獲得一個已經開發的登錄屏幕)。它使用了工具箱中的HTML組件來創建文本框,標籤等。但是我想使用工具箱中的標準組件。我如何用標準組件替換這些HTML組件。將HTML組件更改爲標準組件
當用戶點擊登錄按鈕時,用戶名和密碼在我們提供的默認示例應用程序中得到認證。我不想改變它的功能,但我想要的只是將窗體組件更改爲工具箱中的標準組件。
我該怎麼做?
<% using (Html.BeginForm()) { %>
<%: Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.") %>
<div>
<fieldset>
<legend>Account Information</legend>
<div class="editor-label">
<%: Html.LabelFor(m => m.UserName) %>
</div>
<div class="editor-field">
<%: Html.TextBoxFor(m => m.UserName) %>
<%: Html.ValidationMessageFor(m => m.UserName) %>
</div>
<div class="editor-label">
<%: Html.LabelFor(m => m.Password) %>
</div>
<div class="editor-field">
<%: Html.PasswordFor(m => m.Password) %>
<%: Html.ValidationMessageFor(m => m.Password) %>
</div>
<div class="editor-label">
<%: Html.CheckBoxFor(m => m.RememberMe) %>
<%: Html.LabelFor(m => m.RememberMe) %>
</div>
<p>
<input type="submit" value="Log On" />
</p>
</fieldset>
</div>
<% } %>
什麼? Html組件與標準組件?什麼工具欄? – 2013-02-12 21:51:12
錯字,應該是ToolBox – user1315906 2013-02-12 21:56:41