ananth ganapathy

ananth ganapathy

  • 1.7k
  • 84
  • 24.6k

Problem for displaying html content in cshtml view engine

Feb 21 2014 6:56 AM
Hi friends
i have create one folder in mvc application folder, name as Helper
in that folder i have one class 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MvcApplication43.Models;
using System.Web.Mvc;
using System.Text;
public static class DynamicFormHelper
{
public static string disp(this HtmlHelper helper)
{
return "<h1>Welcome</h1>";
}
}
i call this function in view like below
@using (Html.BeginForm())
{
@Html.disp();
}
i got output in aspx view engine 

Welcome

but i got output in cshtml view engine 
<h1>Welcome</h1>
pls tell any one..

Answers (1)