asp.net-mvc-2 – Asp.net MVC标签
发布时间:2020-12-15 22:25:47 所属栏目:asp.Net 来源:网络整理
导读:我有以下内容 label for="Forename"Forename/label %= Html.TextBoxFor(m = m.Customer.Name.Forename) % 这个问题是它被渲染为 label for="Forename"Forename/labelinput type="text" value="" name="Customer.Name.Forename" id="Customer_Name_Forename"
我有以下内容
<label for="Forename">Forename</label> <%= Html.TextBoxFor(m => m.Customer.Name.Forename) %> 这个问题是它被渲染为 <label for="Forename">Forename</label> <input type="text" value="" name="Customer.Name.Forename" id="Customer_Name_Forename"> 不是我想要的. 我想要一个扩展来正确渲染标签(即使用具有输入id值的for =“”属性),在我编写自己的扩展之前,MVC 2中有什么东西可以做到这一点吗? 解决方法<%= Html.LabelFor(m => m.Customer.Name.Forename) %> <%= Html.TextBoxFor(m => m.Customer.Name.Forename) %> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 设置ASP.NET(Visual Studio)服务器配置的默认页面
- 间歇性ASP.Net状态服务错误
- asp.net – 单独配置文件为web.config的部分
- asp.net – 类型存在于’A’和’B’
- Asp.Net Core API网关Ocelot
- asp.net – 在Response.End之前使用Response.Flush
- asp.net-mvc-3 – ASP.NET MVC 3 WebGrid – 条件列格式
- 优化 – MVC4捆绑策略
- asp.net – ReportViewer – 隐藏PDF导出
- asp.net从指定文化获取.resx的所有资源(ResourceManager.Ge
推荐文章
站长推荐
- asp.net-mvc – 具有html帮助的布尔隐藏和隐藏
- 如何在两个不同的文件夹中应用asp.net授权?
- asp.net-mvc – 使用Castle Windsor在ASP.NET MV
- asp.net-core – 如何编写包含其他标记帮助程序的
- asp.net – 在Azure上增加AppPool超时的优点/缺点
- asp.net-core – 在asp.net 5 mvc中找不到css,js
- asp.net-mvc – RenderPartial从另一个控制器(和
- asp.net – 是否有可能过滤SignalR中的接收器?
- asp.net – Datatable的行计算功能
- asp.net-mvc – 可以更改Html.DropDownListFor生
热点阅读