如何使用mvc 4为@ Html.TextBoxFor添加电子邮件验证到@ Html.TextBoxFor? [英] How to add email validation to @Html.TextBoxFor for a single @Html.TextBoxFor using mvc 4?

查看:93
本文介绍了如何使用mvc 4为@ Html.TextBoxFor添加电子邮件验证到@ Html.TextBoxFor?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是MVC 4的新用户,我有一个包含多个记录的集合,我正在填充多个@html.TextBoxFor的基础上记录的数量。

I am new to MVC 4, i have a collection that hold multiples records, and i  am populating multiple @Html.TextBoxFor on the basis of number of records.

在收集的基础上,我使用foreach循环,并在其基础上填充@Html.TextBoxFor的数量。我的其中一个@ Html.TextBoxFor用于电子邮件。现在,问题是我只想应用电子邮件验证  @ Html.TextBoxFor
i用于电子邮件目的。 

On the basis of collection, i am using foreach loop and on the basis it populate number of @Html.TextBoxFor. One of my @Html.TextBoxFor used for email. Now, question is that i want to apply email validation only that @Html.TextBoxFor which i used for email purpose. 

MVC确实有这样的规定我可以处理邮件验证?或者任何人都有处理它的差异方法。

Do MVC does have such provision where i can handle email validation ? Or anyone have diff approach for handling it.

请提出宝贵的想法,这可以帮助我。

Please suggest your valuable thoughts which could help me out.

谢谢!




推荐答案

请在
MVC论坛
以获得更好的帮助。
Please post mvc related questions at the MVC forum for a better assistance.


这篇关于如何使用mvc 4为@ Html.TextBoxFor添加电子邮件验证到@ Html.TextBoxFor?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆