开发者

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 Date开发者_运维知识库Time?
@Html.TextBox("", (Model.HasValue ? Model.Value.ToShortDateString() : string.Empty), new { @class = "datePicker" })

Does anyone have any ideas?

Thx


Maybe this is a bit late but are you sure the "Build Action" on the file is set to "Content". We had the same problem and in our case it was set to "None".


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜