How do i get rid of the < convert to &lt;

  • Thread starter Thread starter Jasonkimberson
  • Start date Start date
J

Jasonkimberson

I am doing a data pull of HTML from a database that will be put into a
drop down menu

currently after i pull and populate the information, it converts my <
into &lt;

whats the work around for this?

HTML code

<td><asp:DropDownList ID="ddlLocation" Runat="server" /></td>


Code

ddlOfficeList.DataSource = dt;
ddlOfficeList.DataTextField = "urlpath";
ddlOfficeList.DataValueField = "field2";
ddlOfficeList.DataBind();


I want the text field to aslo have the url path as a link
 
I'm assuming that "dt" is a DataTable.

Could you not create a new column in the data table that contains the
urlpath as a displayable string, with the &lt;, &gt; etc. change to
their display equivalents?
 
I've actually even created a new DataTable with the proper fields
filled in and even added the <a href to the SQL string, but when i bing
them to the drop down text property they all get changed from < to &lt;
even though the data they pull is <
 
Back
Top