如何在ASP.Net webform中使用标签?
发布时间:2020-12-15 18:48:43 所属栏目:asp.Net 来源:网络整理
导读:我得到这个纯HTML: label for="txtPais"Pais:/label input name="ctl00$ContentPlaceHolder1$txtPais" type="text" id="ctl00_ContentPlaceHolder1_txtPais" class="textInput" / 在我在Visual Studio中的实际代码我有这个: label for="txtPais"Pais:/labe
我得到这个纯HTML:
<label for="txtPais">Pais:</label> <input name="ctl00$ContentPlaceHolder1$txtPais" type="text" id="ctl00_ContentPlaceHolder1_txtPais" class="textInput" /> 在我在Visual Studio中的实际代码我有这个: <label for="txtPais">Pais:</label> <asp:TextBox ID="txtPais" runat="server" CssClass="textInput"></asp:TextBox> 如何应用此文本框的标签? 解决方法
您应该使用< asp:Label ...>详细的在
this blog post在哈克德
<asp:Label id="label" AssociatedControlId="txtPais" Text="Pais:" runat="server" /> <asp:TextBox id="txtPais" runat="server" CssClass="textInput" /> 这将正确转换正在转换的ID。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc – ASP.NET MVC自定义授权
- asp.net-mvc-3 – 禁用ASP.NET-MVC3中的unicode字符编码
- asp.net – 如何将模型从一个局部视图传递到另一个局部视图
- Asp.net实现MVC处理文件的上传下载功能实例教程
- asp.net-mvc – ASP.NET MVC 1和2在Mono 2.4与Fluent NHibe
- 如何以编程方式单击ASP.NET网页上的按钮?
- asp.net – 什么是连接池?
- 缓存ASP.NET HTTP Handler服务器和客户端的响应
- asp.net-mvc – ASP.NET MVC中的所有内置ActionResults
- 在ASP.NET中为命中计数器实现存储的最佳方法是什么?
推荐文章
站长推荐
- asp.net-mvc-4 – 加入前包含不起作用实体框架6
- ASP.net HTTP 404 – 找不到文件而不是MaxReques
- asp.net – 从wsdl生成webservice
- asp.net – Nuget Package – Web.config.transf
- asp.net-mvc – ASP.NET MVC – RequireJS最佳的
- asp.net-mvc – 为什么ValidateInput(False)不工
- asp.net-web-api – 将对象作为参数传递给Breeze
- 在ASP.NET MVC 3应用程序中编辑并继续
- 文件上传 – 是否可以在上传文件的asp.net webap
- asp.net 解析json数据
热点阅读