Click here to Skip to main content
15,068,929 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
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">&lt;td&gt;
                            &lt;asp:Label ID=&quot;lblAcronym&quot; Font-Names=&quot;Tahoma&quot; Font-Size=&quot;12px&quot; runat=&quot;server&quot; Text=&quot;Acronym&quot;&gt;&lt;/asp:Label&gt;
                            &lt;asp:DropDownList ID=&quot;ddlAcronym&quot;  Font-Names=&quot;Tahoma&quot; Font-Size=&quot;12px&quot; runat=&quot;server&quot;
                                Width=&quot;300px&quot; DataSourceID=&quot;SqlDataSource3&quot; DataTextField=&quot;Name&quot; DataValueField=&quot;AcronymId&quot;&gt;

<pre lang="xml">&lt;asp:SqlDataSource ID=&quot;SqlDataSource3&quot; runat=&quot;server&quot; ConnectionString=&quot;&lt;%$ ConnectionStrings:DotNetNuke2ConnectionString %&gt;&quot;
           SelectCommand=&quot;SELECT AcronymId, [Name] FROM Crestron_Acronym ORDER BY [Name] ASC&quot;&gt;
Updated 22-Mar-11 6:39am
Eduard Keilholz 22-Mar-11 11:24am
I don't understand your question. How can you display dropdown values without HTML?
walterhevedeich 22-Mar-11 11:31am
Im assuming the data that is pulled from the database contains html tags, am i right?
uipatel 22-Mar-11 12:35pm
walterhevedeich 22-Mar-11 13:25pm
Ive seen the code. may I see the sample HTML tags that are being pulled from the DB?
uipatel 22-Mar-11 14:32pm
Automated <a href="ManageAcronym.aspx?Search=Business Projects">Test</a> Procedure
uipatel 22-Mar-11 14:36pm
This is my dropdown
<asp:DropDownList ID="ddlAcronym" Font-Names="Tahoma" Font-Size="12px" runat="server"
Width="300px" DataSourceID="SqlDataSource3" DataTextField="Name" DataValueField="AcronymId">

My Sqldata source :

<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:DotNetNuke2ConnectionString %>"
SelectCommand="SELECT AcronymId, [Name] FROM Crestron_Acronym ORDER BY [Name] ASC">
uipatel 22-Mar-11 14:31pm
ya right...
at display time it should not show
HTML tag..
Sergey Alexandrovich Kryukov 22-Mar-11 12:00pm
Some code, please.
Sergey Alexandrovich Kryukov 22-Mar-11 14:08pm
It is not well formatted. Don't post it here, use "Improve question", format to readability.

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