spark-view-engine

Spark views work initially, but then get a “Dynamic view compilation failed” error after 30 minutes or so

我与影子孤独终老i 提交于 2019-11-30 10:15:33
After pushing my asp.net mvc (with spark view engine) project to our live server yesterday I've started getting a strange error. Everything works fine initially, but after some time (maybe 30 minutes) the views start throwing "Dynamic view compilation failed" errors and complaining about namespaces not existing. The assemblies for the namespaces listed are in the bin (since it did work initially). I'm using the spark view engine on other websites running on the same box and have never seem this issue. What is causing these views to stop working? As qstarin mentioned, recycling the AppPool does

alternative asp.net MVC view engines

风流意气都作罢 提交于 2019-11-30 09:47:51
I was wondering if there was a general consensus on the "best" alternative view engine for asp.net MVC. So far I know of Spark, Brail, NHaml but what about others? I would suggest that you take each of the above View Engines, write a view, and see which works best for you. You might find that for different applications or even for differnt types of view that the choice of View Engine changes. If you're returning HTML to your client then an engine like Spark might be appropriate. However, if the conent you're returning is XML or some other markup (JSON for example) then Spark won't be much help

Spark views work initially, but then get a “Dynamic view compilation failed” error after 30 minutes or so

廉价感情. 提交于 2019-11-29 15:15:46
问题 After pushing my asp.net mvc (with spark view engine) project to our live server yesterday I've started getting a strange error. Everything works fine initially, but after some time (maybe 30 minutes) the views start throwing "Dynamic view compilation failed" errors and complaining about namespaces not existing. The assemblies for the namespaces listed are in the bin (since it did work initially). I'm using the spark view engine on other websites running on the same box and have never seem

alternative asp.net MVC view engines

会有一股神秘感。 提交于 2019-11-29 14:44:28
问题 I was wondering if there was a general consensus on the "best" alternative view engine for asp.net MVC. So far I know of Spark, Brail, NHaml but what about others? 回答1: I would suggest that you take each of the above View Engines, write a view, and see which works best for you. You might find that for different applications or even for differnt types of view that the choice of View Engine changes. If you're returning HTML to your client then an engine like Spark might be appropriate. However,

ASP.NET MVC partial views: input name prefixes

人走茶凉 提交于 2019-11-26 11:34:35
Suppose I have ViewModel like public class AnotherViewModel { public string Name { get; set; } } public class MyViewModel { public string Name { get; set; } public AnotherViewModel Child { get; set; } public AnotherViewModel Child2 { get; set; } } In the view I can render a partial with <% Html.RenderPartial("AnotherViewModelControl", Model.Child) %> In the partial I'll do <%= Html.TextBox("Name", Model.Name) %> or <%= Html.TextBoxFor(x => x.Name) %> However, the problem is that both will render name="Name" while I need to have name="Child.Name" in order for model binder to work properly. Or,

How do I get the collection of Model State Errors in ASP.NET MVC?

徘徊边缘 提交于 2019-11-26 06:56:29
问题 How do I get the collection of errors in a view? I don\'t want to use the Html Helper Validation Summary or Validation Message. Instead I want to check for errors and if any display them in specific format. Also on the input controls I want to check for a specific property error and add a class to the input. P.S. I\'m using the Spark View Engine but the idea should be the same. So I figured I could do something like... <if condition=\"${ModelState.Errors.Count > 0}\"> DispalyErrorSummary() <

ASP.NET MVC partial views: input name prefixes

时光怂恿深爱的人放手 提交于 2019-11-26 02:28:03
问题 Suppose I have ViewModel like public class AnotherViewModel { public string Name { get; set; } } public class MyViewModel { public string Name { get; set; } public AnotherViewModel Child { get; set; } public AnotherViewModel Child2 { get; set; } } In the view I can render a partial with <% Html.RenderPartial(\"AnotherViewModelControl\", Model.Child) %> In the partial I\'ll do <%= Html.TextBox(\"Name\", Model.Name) %> or <%= Html.TextBoxFor(x => x.Name) %> However, the problem is that both

ASP.NET MVC View Engine Comparison

倾然丶 夕夏残阳落幕 提交于 2019-11-25 23:48:01
问题 I\'ve been searching on SO & Google for a breakdown of the various View Engines available for ASP.NET MVC, but haven\'t found much more than simple high-level descriptions of what a view engine is. I\'m not necessarily looking for \"best\" or \"fastest\" but rather some real world comparisons of advantages / disadvantages of the major players (e.g. the default WebFormViewEngine, MvcContrib View Engines, etc.) for various situations. I think this would be really helpful in determining if