Sign in to follow this  
sanjaysutar

Rendering Chart In Asp.net Mvc

Recommended Posts

Hi,

 

I am using Asp.Net MVC 3 with Razor views

 

In a View (aspx page) if I use <h2><%= ViewData["Message"] %></h2> it renders a chart properly

 

 

In Razor View (cshtml page), I am using <h2>@ViewData["Message"]</h2>, which is not rendering chart but the string data for chart

 

 

Any help would be appreciated.

 

Thanks,

Sanjay

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

I am using Asp.Net MVC 3 with Razor views

 

In a View (aspx page) if I use <h2><%= ViewData["Message"] %></h2> it renders a chart properly

 

 

In Razor View (cshtml page), I am using <h2>@ViewData["Message"]</h2>, which is not rendering chart but the string data for chart

 

 

Any help would be appreciated.

 

Thanks,

Sanjay

 

 

Hi,

 

Can you paste sample code here? so that we can test.

 

 

 

Share this post


Link to post
Share on other sites

Hi,

 

The problem has been fixed. Instead of @ViewData["Message"], I have to use @Html.Raw(ViewData["Message"]).

 

Hi,

 

Can you paste sample code here? so that we can test.

 

 

 

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

The problem has been fixed. Instead of @ViewData["Message"], I have to use @Html.Raw(ViewData["Message"]).

 

 

 

Its glad to know that you have managed to resolve your issue.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this