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 Vi...
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'm using the Spark view engine, and want to localize the website. The methods described for 'conventional' MVC view engine do not work. Has anyone done this already? Any help would be appreciated.
...
What pros(positive sides) of using Spark view engine for ASP.NET MVC project. Why it better then default view engine?
...
I'm interested in using Spark for an open source pet project of mine that runs with the asp.net mvc framework. I wonder if anyone has real experience with it and knows how it performs compared to the normal asp.net view engine?
I know that marketwatch.com runs asp.net mvc and Spark.
...
I have Spark view engine registered with my MVC app and it works great :-)
I have a problem however getting FluentHtml extension method intellisense working on my views. I was wondering if anyone else has had this problem?
This code works: <%= this.TextBox(x => x.Name) %> But I dont get intellisense?
I have intellisense working for ev...
I've got this code in an MVC project using the WebForms view engine and I'm trying to convert it over to Spark. How can I conditionally call a partial and pass it view data?
<% if (UserService.IsAuthenticated && !Model.Post.IsDeleted) { %>
<% Html.RenderPartial("Reply", new ReplyViewModel { Id=Model.Post.PostId, CssClass="respond" }...
Uff...long title.
As it states, when the asp.net redirects to the login page, it adds the ?RequestUrl=/pathToSome/Action to the url. When this happens I get that YSOD :"The view '/PathToSome/Action' or its master could not be found. The following locations were searched:"
Any thoughts on why?
Thanks
Bruno
...
I'm using the spark view engine with my asp.net mvc application.
In my aspx pages, I can succesfully use Html.Actionlink, but when I attempt it in spark files, it doesnt show up in intellisense, and when i try to run it anyway, i get:
Dynamic view compilation failed.
c:\Users\midas\Documents\Visual Studio 2008\Projects\ChurchMVC\ChurchM...
I am in the process of converting views from ASP.NET MVC TagSoup to using Spark. However, I can't figure out if there is an analogue to ASP.NET Nested Masters in Spark layouts.
If this isn't there, would the best approach be to use partials?
...
I'm using ASP.NET MVC (1.0), Spark View Engine (1.0) and SubSonic (3.0.0.3).
I'm having some trouble getting an "Edit" view to work correctly. So, in my controller, I have the following controller action that displays the edit form view:
[AcceptVerbs(HttpVerbs.Get)]
public virtual ActionResult Edit(string name)
{
var plot = Plot.Si...
EDIT: added a community wiki answer to begin capturing people's experience with various View Engines. Please respectfully add any experiences you've had.
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 vi...
I'm trying to work around the lack of a CheckBoxList in ASP.NET MVC. I've gotten to the point I can render a list of Enum values just fine, but I'm stuck on how to set the checked attribute based on my Model - Which in this case is a User entity that has an IList of Role entities. The role id's correspond to the enum values.
This exampl...
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("AnotherView...
I have a weird one. I'm trying to render out a standard textarea simply using the TextArea helper:
<p>
<label for="Message">Message:</label>
${ Html.TextArea("IssueText") }
${ Html.ValidationMessage("IssueText", "*") }
</p>
And my controller
public ActionResult Contact() {
return View();...
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 t...
I've heard or read somewhere (can't recall where) that the spark view engine supports the notion of defining custom html tags. I would like to use this for rounded corners. Which in our HTML consist out of 6 different div's wrapped around the actual content. If I could replace this with or something like that it would make things much m...
Some body tried Spark View Engine with asp.net mvc 2 preview 2?
I have a problem with AREAS.
It looks likes spark engine looks *.spark files inside of Views folders only instead of Areas folder in additionally.
My question is:
Somebody has information how to add it?
...
My client application needs to generate HTML. I'd like to use a template/view engine solution like Spark, but I'm not sure whether Spark can be used outside of an ASP.NET application. Does anyone know of any samples or documentation about using Spark in this way?
(If you know of other view engine solutions that can be used stand-alone, ...
Hi,
I am using the Spark view Engine instead of the default ASP.NET view engine and I'd like to be able to add a 'spark' view instead of a 'ASP.NET' view when adding a new view to the project. I assume this would just be a template of some kind but I can't seem to find it.
for example I want it to generate a view something like this;
...