如何从下拉菜单中删除HTML标签 [英] how to remove HTML tags from dropdown
本文介绍了如何从下拉菜单中删除HTML标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在使用1下拉列表,该下拉列表与sqldatasource1绑定.
在运行时,它显示带有HTML标记的内容
我只想显示内容,而不是html标签.
(如何从下拉菜单中删除HTML标签)
hi All,
I am using 1 dropdown, which I bind with sqldatasource1.
at runtime it display content with HTML tags
I want to display only Content not html tags.
(how to remove HTML tags from dropdown)
here is my code :
<pre lang="xml"><td>
<asp:Label ID="lblAcronym" Font-Names="Tahoma" Font-Size="12px" runat="server" Text="Acronym"></asp:Label>
</td>
<td>
<asp:DropDownList ID="ddlAcronym" Font-Names="Tahoma" Font-Size="12px" runat="server"
Width="300px" DataSourceID="SqlDataSource3" DataTextField="Name" DataValueField="AcronymId">
</asp:DropDownList>
</td></pre>
<pre lang="xml"><asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:DotNetNuke2ConnectionString %>"
SelectCommand="SELECT AcronymId, [Name] FROM Crestron_Acronym ORDER BY [Name] ASC">
</asp:SqlDataSource></pre>
推荐答案
ConnectionStrings:DotNetNuke2ConnectionString%& quot; SelectCommand =" SELECT AcronymId,[Name] from Crestron_Acronym ORDER BY [Name] ASC" & lt;/asp:SqlDataSource& gt; < /pre
ConnectionStrings:DotNetNuke2ConnectionString %>" SelectCommand="SELECT AcronymId, [Name] FROM Crestron_Acronym ORDER BY [Name] ASC"> </asp:SqlDataSource></pre>
这篇关于如何从下拉菜单中删除HTML标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文