spark-view-engine

ASP.NET MVC1 - Not all Request fields being returned in Model... (NOOB question)

I'm working on my very first ASP.NET MVC project, and I'm seeing strange behavior when returning data from an Edit View to my controller action. Right now, I have 3 textboxes on the page, plus one hidden one for the PKey. All are being populated from the viewdata correctly, but when I submit the form, only 2 of the 3 fields show up in ...

Example of using HTML forms with Sparkview engine on ASP.NET MVC2

I am playing with Sparkview 1.0 on ASP.NET 4.0 with MVC2. Trying to create a simple HTML form. When the form loads, it renders as expected. Click Save button on the form, the model validates, returns an error about length of field (expected) but then the !{ Model.Name } tag gets rendered as the text ${ Model.Name } rather than the actua...

How to use Html.RenderAction in SparkView Engine?

I am getting an error when I use it like this !{Html.RenderAction("Action", "Controller")} I had to switch to webforms view engine and replace it with <% Html.RenderAction("Action", "Nav"); %> to get it to work. The error I am getting is "Cannot convert void to char" ...

Removing master layout from view (MVC2)

Hi, 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? ...

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

Hi 2 all, 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-e...

How can I make !{ } in SparkViewEngine not render anything?

How can I prevent the Spark view engine from rendering the debugging hint when a null ref exception is thrown in !{ }? It always renders "${ expression.that.throws.nre }". The documentation states that it should render an empty string... it never mentions the behavior I'm experiencing. Using settings.SetDebug(false) doesn't change this b...

Spark View Engine very slow code editing in Visual Studio 2008

How to increase editor responsiveness when typing code for Spark View Engine? Spark plugin for VS08 takes lot of CPU resources as it checks the syntax of all Spark files on each key stroke: does anyone have an idea how to optimize this? ...

Using Html.ActionLink() with ASP.NET MVC & Spark - Syntax?

All, Doing some experimenting with Spark and MVC within NerdDinner. The normal/aspx view works well, and I haven't touched any of the controller code so I'm pretty sure it's not that. <viewdata model="System.Collections.Generic.IEnumerable[[NerdDinner.Models.Dinner]]"/> <set Title="'Upcoming Dinners'"/> <content:main> <li each="p i...

MVC2, MySparkView custom base page and Html.BeginForm

Hello, I'm currently trying to get MVC2 and Spark to work happily. Everything looks great, however I can't for the life of me get Html.BeginForm to write out the form tags. My code is: #Html.BeginForm(); <div> <fieldset> <legend>Account Information</legend> <div class="editor-label"> ${Html.LabelFor(m => m.UserNam...

How do we represent the following peice of view code in Spark view?

<% using (Html.BeginForm("AddToCart", "Cart")) { %> <%= Html.Hidden("ProductID", pr.ProductID) %> <%= Html.Hidden("returnUrl", ViewContext.HttpContext.Request.Url.PathAndQuery) %> <input type="submit" value="+ Add to cart" /> <% } %> Currently I am using # using (Html.BeginForm("AddToCart", "Cart")) { ${Html....

Mixing spark and webform view engines

Is it possible to use multiple view engines? I have a large(ish) site that is already using the webforms view engine, but we would like to move to spark for new features. Is this supported? any documentation online that details how to do this? ...

Using asp.net site.master and spark views

Is it possible to use my site.master master page ? I want to start using Spark more, but this project I am working on is using asp.net view pages as well. I could of course convert the master page to an application.spark page, but I was wondering if it is at all possible to use the Site.Master I already have. ...

SparkView Engine on Linux Mono

I'm trying to use SparkView engine with ASP.NET MVC running on a Linux machine, but there seems to be known problems resolving view paths eg: System.InvalidOperationException: The view 'Index' or its master could not be found. The following locations were searched: ~/Views/Home/Index.aspx ~/Views/Home/Index.ascx ~/Views/Shared/Index.asp...

Spark View Engine and using viewdata confusion

I can't seem to get a grasp on how to use the viewdata structure in the spark view engine. I have the following code in my controller: // Retrieve the project list from the database var projects = from p in _context.Repository<project>() orderby p.name ascending select p; ...

How to declare parameters (variables) in a partial view?

Given a spark view named SomeContainer.spark that uses a partial view this way: <SomeContent param1 = "Model.SomeValue"/> and given a partial view named SomeContent.spark that uses the parameter this way: <div>${param1}</div> How can I modify SomeContent.spark to declare param1 upfront. I want to do that for two reasons: Readabil...

.spark views get copied to /bin/Views - why?

Building or publishing my ASP.MVC 2 application the .spark files in the View directories copied to /bin/Views/*. This redundancy seems to be useless as the app runs fine on the server even if I delete the bin/Views directory. Any idea how to prevent this behavior? My files are tagged with the default build action "Content" and the Vi...

To Spark or not to Spark?

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 ...

What to put in Spark SetPageBaseType setting

I use Spark to output some HTML straight from a console app. I have the following view classes in my project. //A shared view that all other views should use public abstract class SharedView : AbstractSparkView { public string BasePath = string.Empty; } public abstract class ApplicationView : SharedView { public Application App...

ASP.NET MVC View Engine Resolution Sequence

I created a simple ASP.NET MVC version 1.0 application. I have a ProductController which has one action Index. In the view, I created a corresponding Index.aspx under Product subfolder. Then I referenced the Spark dll and created Index.spark under the same Product view folder. The Application_Start looks like protected void Applic...

Can I create an isolated page in a project with spark masterpage setup?

Ive got a project that has got an application.spark and a html.spark that contains all the masterpage markup. The views work fine, but I need to create an isolated page that has no relation at all with the masterpages. Is it possible or will I need to have another nested masterpage? Thanks ...