spark-view-engine

To Spark or not to Spark?

筅森魡賤 提交于 2020-01-01 08:21:11
问题 Been on a huge learning binge with ASP.MVC 2 lately, and recently uncovered there are different rendering engines out there... Spark especially caught my attention, couple of things though. I have vast knowledge with ASP.NET so is it worth the ramp up, in addition to ASP.NET MVC Is it worth it in general? Does it really matter? It seems to be a preference of taste really and not so much performance or even a substantial reduction in developer time. It still seems immature, not very good

To Spark or not to Spark?

China☆狼群 提交于 2020-01-01 08:21:11
问题 Been on a huge learning binge with ASP.MVC 2 lately, and recently uncovered there are different rendering engines out there... Spark especially caught my attention, couple of things though. I have vast knowledge with ASP.NET so is it worth the ramp up, in addition to ASP.NET MVC Is it worth it in general? Does it really matter? It seems to be a preference of taste really and not so much performance or even a substantial reduction in developer time. It still seems immature, not very good

Removing master layout from view (MVC2)

人盡茶涼 提交于 2019-12-31 04:41:07
问题 if i need remove master layout from my view, how can i do it in MVC2? i tried put code in my view that was shown in documentation http://sparkviewengine.com/documentation/master-layouts: , but it still bring my Application.spark layout :-/ any ideas why? 回答1: Not tested, but what if you create and empty master layout, and say <use master="EmptyMaster" /> in the top of your view? Or you could call on the empty master from the controller; return View("View", "EmptyMaster"); Don't know if it'll

Spark View Engine with custom HTML Helpers

匆匆过客 提交于 2019-12-24 11:27:26
问题 I've added some of my own helpers to the System.Web.Mvc within my project and got it working with the default asp.net mvc view engine. By defining the helper like namespace System.Web.Mvc { public static class XSSHelper { public static string h(this HtmlHelper helper, string input) { return AntiXss.HtmlEncode(input); } public static string Sanitize(this HtmlHelper helper, string input) { return AntiXss.GetSafeHtml(input); } public static string hscript(this HtmlHelper helper, string input) {

Can't set up asp.net mvc 2 RC and spark view engine

断了今生、忘了曾经 提交于 2019-12-24 03:05:41
问题 Does omebody has ideas how to fix "Method not found: 'Void System.Web.Mvc.ViewContext..ctor(System.Web.Mvc.ControllerContext, System.Web.Mvc.IView, System.Web.Mvc.ViewDataDictionary, System.Web.Mvc.TempDataDictionary)'." exception. This solution doesn't work http://dotnetslackers.com/articles/aspnet/installing-the-spark-view-engine-into-asp-net-mvc-2-preview-2.aspx. Thans for all. 回答1: I had to download the spark view engine source code (http://sparkviewengine.codeplex.com/Release

How do you add htmlHelpers into the Spark virew

半腔热情 提交于 2019-12-24 01:54:59
问题 I want to use the htmlHelpers in my spark view but I keep getting the following errors. error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) I have added the System.Web.Mvc assembly into the project. I have also added the following code into the module (just for the sake of getting it working - I'll probably need to add this code to the bootstrapper --- not sure how to do that yet!) var settings = new

What is the difference between ${…} and !{…} in the Spark View Engine?

你。 提交于 2019-12-23 18:13:02
问题 What is the difference between ${...} and !{...} in the Spark View Engine? There probably is a really distinct difference between the two, but I see them used interchangeably. Does one encode the output and the other doesn't? Which I have seen some discussion about in the groups? If that is true then what does this do: ${H(Model.Name)} Also how will setting the following in the config effect ${} and !{} ? <pages automaticEncoding="true|false" /> I am hoping to document this for others as well

Will the Spark view engine interoperate with webforms master pages?

时光毁灭记忆、已成空白 提交于 2019-12-20 04:49:47
问题 I really like Spark, but we've already got a big investment in webforms based views. I'd like to start using Spark without having to convert all my existing views up front. The only problem I have with getting Spark working side by side with webforms is the master pages. Currenly I have spark layouts that are 1 for 1 duplicates of the master pages. This amount of duplication isn't acceptable. I've already been bitten by it several times. Is there any way to get spark views to work within a

“The name 'Html' does not exist in the current context” exception

放肆的年华 提交于 2019-12-13 05:19:43
问题 I'm rendering Spark templates in a console application and I'm trying to use RenderPartial like so: ${Html.RenderPartial("_mypartial.spark", myData)} but I'm getting this error when compiling the view: The name 'Html' does not exist in the current context In the Shared\_global.spark I have added this imports: <use namespace="System" /> <use namespace="System.Web.Mvc" /> <use namespace="System.Web.Mvc.Html" /> <use namespace="System.Collections.Generic" /> <use namespace="System.Linq" />

Public resources, spark & conflict

和自甴很熟 提交于 2019-12-12 15:40:50
问题 Using this to generate my resources. Problem is, spark dies when tries to generate dynamic views because there is app_globalresources.dll and myapp.dll somewhere there - deep into temp jungles. .spark(9,36): error CS0433: The type 'Resources.Account' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\webpac\031ff06d\e6932d30\assembly\dl3\f31cd083\982c5673_7f8dca01\myApp.DLL' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\webpac