views:

20

answers:

0

Hi,

I am trying to use custom templates of ASP.NET MVC2. But it does not show any content in my defined template.

Here's my code description I have a controller called TestController. and I create a view for Create action and I wrote following code in the view just created.

<%: Html.EditorForModel() %>

Then I create add a new web user control Test.ascx under Views/Shared/EditorTemplates. And content is pretty sample. I just want to try if the function works.

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
sample:<input type="text" name="sample" value="sample" />

Then I build the solution and lauch the web site. It does not show anything defined up in my Test.ascx.