Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 564967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:49:20+00:00 2026-05-13T12:49:20+00:00

I have a asp.net detailsview control on a page. I’ve noticed that it always

  • 0

I have a asp.net detailsview control on a page. I’ve noticed that it always displays the raw text from my database field, it doesn’t interpret the html in the text — so it displays < b>mytext< /b> instead of just mytext in bold.

Is there anyway to get the control to interpret the html in the data being returned

Regards
melt

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:49:20+00:00Added an answer on May 13, 2026 at 12:49 pm

    Can you post the code of your control? The basics are you need to set the HtmlEncode property to false. This is due to a difference in how labels and textboxes handle encoding, something meant to protect you from malicious scripts someone may have entered in these fields.

    If you have it set to auto-generate fields (default), you’ll need to change to BoundFields or TemplateFields instead and set the offending field’s HtmlEncode Property to false.

    You can see a code sample of the individual fields in MSDN, here’s a simplified example:

    <asp:DetailsView runat="server" AutoGenerateRows="False">
      <Fields>
        <asp:BoundField DataField="ProductName" HeaderText="Product" />
        <asp:BoundField DataField="CategoryName" HeaderText="Category" />
        <asp:BoundField DataField="HTMLField" HeaderText="HTML" HtmlEncode="false" />
      </Fields>
    </asp:DetailsView>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a DetailsView in ASP.NET that gets data from the database based
So I have an ASP.NET page with two controls: a GridView which displays rows
I am new to asp.net. I have a details view control on my page.
When I localize an asp.net page that is using bound controls (DetailsView, etc) that
.NET 4 ASP.NET I have a DetailsView that is displaying an entity framework record
i have asp.net page that is opened inside an iframe. How to redirect to
I have Asp.net application that implemented with Dynamic Data technology. All data from my
I have asp.net checkboxlist control that bounded to a data source so the number
I have asp.net TextBox with ontextchanged event this is search text box in my
I have ASP.NET page with an iframe on it for displaying some pdf reports

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.