在下拉文本中显示[email protected]而不是电子邮件 [英] Showing [email protected] in dropdown text instead of email

查看:989
本文介绍了在下拉文本中显示[email protected]而不是电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<select class="form-control" data-val="true" data-val-required="The User field is required." id="UserId" name="UserId"><option value=""></option>
<option value="6"><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d392b7bebabd93a0a6b1beb6a1b0b6fdb0bcbe">[email protected]</a></option>
</select>





当我在下拉列表中绑定电子邮件时,电子邮件文本会自动转换为[email protected]。当我试过检查dropdwonlist然后我有上面的代码片段。



谢谢



我尝试了什么:



我试图启用javascript但它无效。



When I bind email in dropdownlist then email text automatically converted into [email protected].When I have tried to inspect dropdwonlist then I have got the above code snippet.

Thanks

What I have tried:

I tried to enable javascript but it's not working.

推荐答案

您的虚拟主机正在执行此操作以防止垃圾邮件。联系他们以查看是否可以删除它或谷歌云计算电子邮件保护以撤消它的想法。
Your webhost is doing this to protect against spam. Contact them to see if it can be removed or google "cloudfare email protection" for ideas to undo it.


只需使用
<!--email_off--> html code of dropdownlist here <!--/email_off-->



了解更多信息,请参见下面的示例:




for more see below example:

<!--email_off--> @Html.DropDownListFor(m => Model.UserId, (Model.GetUsers == null ? Enumerable.Empty<selectlistitem>() : Model.GetUsers.Select(a => new SelectListItem { Text = a.Name, Value = a.ID.ToString() })), new { @class = "form-control" }) <!--/email_off-->





工作正常。



谢谢



It's working fine.

Thanks


这篇关于在下拉文本中显示[email protected]而不是电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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