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 6808091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:54:46+00:00 2026-05-26T19:54:46+00:00

I Use MVC and sometimes need to pass the ViewBag.Message from Controller to view,

  • 0

I Use MVC and sometimes need to pass the ViewBag.Message from Controller to view, and I need new line, I check this: ViewBag.Message = SomeStrring + "/r/n" + SomeAnotherString; Also this One ViewBag.Message = SomeStrring + "</ br>" + SomeAnotherString; but none of them work, how can I do this?

  • 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-26T19:54:46+00:00Added an answer on May 26, 2026 at 7:54 pm

    Your slashes are misplaced. It’s <br/>, and you must output it into the view using @Html.Raw(ViewBag.ErrorMessage) to make it not escape the HTML 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In web design I use MVC pattern, but sometimes I need to create non-web
I'm trying to use Controller.File to return a FilePathResult from a view in my
I'm trying to use MVC for a new project after having been around the
MVC use action attributes to map the same view for http get or post:
earlier I use Spring MVC and annotation @ModelAttribute. @Controller public class ArticleController { @ModelAttribute(articles)
We are looking to use the MVC Framework in our SP Application. This is
I have a asp.net website, which use MVC 1.0 framework, but I found sometimes
What is the need of favicon.ico. I am trying to use MVC error handling
I am a web and mobile application developer and I prefer to use MVC
I use Spring MVC [version: 2.5] and Security[version: 2.0.4]. My problem looks like that:

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.