Asp.Mvc 2.0用户登录实例讲解---(4)服务器端验证(17)
<td> <%: Html.LabelFor(m => m.UserPwd) %></td>
<td> <%: Html.PasswordFor(m => m.UserPwd) %></td>
<td><%:Html.ValidationMessageFor(m=>m.UserPwd) %></td>
</tr>
<tr>
<td> <%: Html.LabelFor(m => m.ConfirPwd) %></td>
<td> <%: Html.PasswordFor(m => m.ConfirPwd)%></td>
<td><%:Html.ValidationMessageFor(m=>m.ConfirPwd) %></td>
</tr>
<tr>
<td> <%: Html.LabelFor(m => m.Email) %></td>
<td> <%: Html.TextBoxFor(m => m.Email) %></td>
<td><%:Html.ValidationMessageFor(m=>m.Email) %></td>
</tr>
<tr>
<td> <input type="submit" value="提交" /></td>
<td></td>
<td></td>
</tr>
</table>
<%Html.EndForm(); %>
</div>
</body>
</html>
controller代码
[csharp] /// <summary>
/// 注册提交
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
public ActionResult Register(Models.RegisterModel model)
相关新闻>>
- 发表评论
-
- 最新评论 更多>>