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

  • Home
  • SEARCH
  • 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 8502177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:24:44+00:00 2026-06-11T01:24:44+00:00

I came over the following problem during creating my homepage. I have a database

  • 0

I came over the following problem during creating my homepage.

I have a database which contains a comment from an user. This comment should be able to contain HTML elements for formatting and high flexibility.

Text in database cell (Type: ntext):

Hi, I'm a <b>Comment</b>

Code in .cshtml file:

<p>@textfromdb</p>

What is displayed on the website:

Hi, I’m a <b>Comment</b>

What should be displayed on the website:

Hi, I’m a Comment

Is it possible to somehow render that string to a valid HTML string? I sadly did not found any useful information on Google, mainly due to a lack of the right keywords I think.

Thanks for your help!

  • 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-06-11T01:24:46+00:00Added an answer on June 11, 2026 at 1:24 am

    Try the following:

     @Html.Raw(textfromdb)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This came up when answering another user's question (TheSoftwareJedi)... Given the following table: ROW_PRIORITY
I was working on a JavaScript application and came over this weird behavior. Can
A colleague of mine came across an article on codeproject over the weekend which
I have been reading over some code lately and came across some lines such
Came across this code: <?php require_once 'HTTP/Session/Container/DB.php'; $s = new HTTP_Session_Container_DB('mysql://user:password@localhost/db'); ini_get('session.auto_start') or session_start();
While researching Oracle Analytics, I came across this query: select an_id, a_date, min(a_date) over
On several occasions I have received the following error from a .Net (C#, 4.0)
I have the following code which spits out prime numbers between 1 and N.
So I have a gridview which lists a bunch of jobs. On this gridview
While going over some code I came across the following line of code ostream&

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.