Click here to Skip to main content
15,867,771 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi I want to discared(Hide) HTML tag which is comming in dropdown.
My dropdown is binded with sqldatasource, so data is comming from sql database.
At Run time/display time I want to show in dropdown only data insted of HTML tage

It display Like this

Example: a href="ManageAcronym.aspx?Search=CRM (link to CRM) Development (environment)">Assembly</a></a>

I want to display Like this

Example :
C++
Assembly

_____________________
My Dropdown Code :

XML
<asp:DropDownList ID="ddlAcronym" Font-Names="Tahoma" Font-Size="12px" runat="server"
                                Width="350px" DataSourceID="SqlDataSource3" AppendDataBoundItems="true" DataTextField="Name"
                                DataValueField="AcronymId">
                                <asp:ListItem Value="-1">-- Choose One --</asp:ListItem>

______________
My Sqldatasource code :

XML
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:DotNetNuke2ConnectionString %>"
           SelectCommand="SELECT AcronymId, [Name] FROM Crestron_Acronym ORDER BY [Name] ASC">
       </asp:SqlDataSource>
Posted
Updated 23-Mar-11 8:02am
v2

1 solution

Use RegEx(Regular Expression) to remove HTML tags.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900