Search code examples
asp.net-mvc-3razoreditortemplates

MVC 3 EditorTemplates not working on production


I'm facing a strange problem when deploying my application to the production server.

I've used the Editor Templates to create date pickers (add class to date box and let jquery show the date picker).

This is working perfect on development where I'm running the site on a local IIS 7 webserver (not the development IIS express) When I've deployed the application to the production machine, the date boxes are showed as regular text boxes instead of the date picker.

Is there something that I can check that's not on the production machine that can cause these kind of problems?

The DateTime.cshtml in the Views\Shared\EditorTemplates folder:

@model DateTime?
@Html.TextBox("", (Model.HasValue ? Model.Value.ToShortDateString() : string.Empty), new { @class = "datePicker" })

Does anyone have any ideas?

Thx


Solution

  • I've been able to resolve the problem. I was using the deploy actions in VS2010. I've now deployed manually and moved all files to the webserver. This seems to be working. Afterwards I've removed all code files from the server and it keeps working