本文介绍了如何使用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 4为@ Html.TextBoxFor添加电子邮件验证到@ Html.TextBoxFor?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 20:32