Click here to Skip to main content
15,891,749 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)

XML
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;/td&gt;
                        &lt;td&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;
                            &lt;/asp:DropDownList&gt;
                        &lt;/td&gt;</pre>


<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;
       &lt;/asp:SqlDataSource&gt;</pre>
Posted
Updated 22-Mar-11 6:39am
v3
Comments
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    
right
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

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