My Controller is...
public ActionResult CreateEmailStep5()
{
MyViewModel mvm = new MyViewModel();
mvm.myStringProperty = @"$(document).ready(function ($) {
$('#Help').MyTour(
{
tourType: 'step',
overlayOpacity: 0.5,
.......
.......
});
});"
return View(mvm);
}
what am i trying with my .cshtml is like....
@model MyProj.ViewModels.MyViewModel
<script type="text/javascript">
Model.myStringProperty;
</script>
I tried several things like Response.Write, HtmlDecode and HtmlEncode... what happening is... My Single Quote is being converted to its ascii " ' "
when i am trying...
Response.Write(@HttpUtility.HtmlDecode(Model.myStringProperty).ToString());
instead of
Model.myStringProperty;
in my .cshtml then its giving erro $ is not defined while i have added all required links