Can't Setup Mvc 2 RC And Spark View Engine
Jan 26, 2010
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.
View 3 Replies
Similar Messages:
Apr 10, 2010
I was going through the spark view engine documentation and found a lot of literals showing up in code for which I couldn't find any references. For e.g. ! , #, $ , !$ , ... What are these for? What do the combinations mean? When do they come into use? Am I missing any more literals that precede or comes after {
View 3 Replies
Jan 14, 2010
How do you modify a ASP.NET MVC 2.0 project to work with the Spark View Engine?
I tried like described here:
[URL]
But somehow it still tries to route to .aspx files.
Here the code of my global.asax:
public class MvcApplication : System.Web.HttpApplication
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(.......
View 5 Replies
May 21, 2010
I try to use HtmlHelper.TextBoxFor with spark view engine but view crashed with exception "Dynamic view compilation failed. 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'TextBoxFor' and no extension method 'TextBoxFor' accepting a first argument of type 'System.Web.Mvc.HtmlHelper' could be found(are you missing a using directive or an assembly reference?)".
It is my _global.spark:
<use namespace="System"/>
<use namespace="System.Linq"/>
<use namespace="System.Text" />
<use namespace="System.Web.Mvc"/>
<use namespace="System.Web.Mvc.Html"/>
<use namespace="System.Web.Routing"/>
<use namespace="System.Linq.Expressions" />
<use namespace="MyModels" />
In spark-view using:
${Html.TextBoxFor(m => m.UserName)}
View 1 Replies
Jan 14, 2010
Will I get the advantage of the new Strongly Typed Html Helpers with asp.net MVC 2 if were to use the spark engine for rendering?
View 3 Replies
Nov 29, 2010
I'm trying to render a partial view as a string so it can be returned as HTML to a jquery ajax call. After a lot of searching I found this code.
public string RenderAsString(string viewName, string modelName, object model)
{
// Set up your spark engine goodness.
var settings = new SparkSettings().SetPageBaseType(typeof(SparkView));
var templates = new FileSystemViewFolder(Server.MapPath("~/Views"));
var engine = new SparkViewEngine(settings) { ViewFolder = templates };.......
View 2 Replies
Mar 12, 2010
I'm currently using ASP.NET MVC 2 and the spark view engine. The main master page (application.spark) contains all of the CSS link tags that need to be present for all pages (global stuff). However, I have some content pages that have page specific CSS tags and currently I'm just sticking the link tag in the body as something like:
<content name="MainContent">
<!-- page specific csss -->
<link rel="stylesheet" href="/Content/css/page_specific.css" />
My problem is that when the page renders, this tag ends up in the which is not where it needs to be. Is there a solution for this?
I had was to check the controller in the Application.spark page and write out which page specific css file is required for that particular controller, however, that solution doesn't seem to scale well and I would imagine there is some way of creating the link in the child page and having it render where it's supposed to by the browser.
View 1 Replies
Dec 8, 2010
I have a web form in SPARK which allow the editing of a Facility class that contains Rooms. When editing the Facility all the Rooms are listed for editing too. The form works fine for editing, but I would like to include a button "Add Room" that adds a new blank room below the existing ones.
Currently I am doing this in my SPARK page:
[code]....
AddFacilityRoom contains the html elements for editing a room.
I would like add.mvc to create a new empty Room class and inject a new identical (but empty) control below the existing ones. Currently, though it opens a new page when the "Add a Room" button is clicked.
View 2 Replies
Sep 2, 2010
If I look at the Razor View Engine, then I see a very nice and concise syntax that is not particularly tied to generating html. So I wonder, how easy would it be to use the engine outside asp.net in a "normal" .net environment for example to generate text, code,...
View 3 Replies
Apr 17, 2010
As ASP.NET MVC has a pluggable view engine architecture, and XAML is an object descriptive mark-up that, given the right processor/ parser, can generate an appropriate UI...are there plans/ efforts to create a view engine that can turn XAML into HTML?
Personally, I think this would help to re-enforce the efforts the WPF/ Silverlight people have gone to in providing a means of seperating the view from the model/ business logic between designers and developers (via Visual Studio and Expression Blend)...
Seems like a logical step to me, but not knowing XAML as well as I should, I'm wondering if feasable, or even relevant.
View 3 Replies
Feb 11, 2011
if anyone has built an MVC application using XSL as the view engine? One of my aims is to allow the designer to create multiple skins using xsl files.
View 3 Replies
Mar 12, 2011
I have used the xslt code from Steven Sandersons book 'Pro ASP.NET MVC2 Framework' for the xslt view engine and that is working perfectly. However I am now looking at using a master page for the header, footer, and navigation sections and only need to use my other xslt files to populate the content part.
View 3 Replies
Nov 21, 2010
I tried searching a bit and didn't find an answer. Does the Razor View Engine work in Mono?
View 3 Replies
Dec 21, 2010
How to integrate Razor view engine into mvc 2 web application?
View 3 Replies
Dec 14, 2010
I'm working trying to realize a requirement where the pages should be 'configurable' at runtime (per client), stored in a database - a requirement that I have no say in Anyway, the current plan is to use the Razor view engine and 'load' the 'pages' dynamically. I have a basic sample working using a VirtualPathProvider and VirtualFile that serves up Raz'pages' on the fly.The question I have if there is a better approach when I have the Razor 'pages' stored in a dB (or any other repository)?
There seems to be some constraints and concerns when I check other postings. For example:'If a Web site is precompiled for deployment, content provided by a VirtualPathProvider instance is not compiled, and noVirtualPathProvider instances are used by the precompiled site.'
(from http://msdn.microsoft.com/en-us/library/system.web.hosting.virtualpathprovider.aspx )
View 1 Replies
Aug 22, 2010
I am working on a MVC project with Razor view engine and I have the following:
[Code]....
This only works if I have on the same view the following:
[Code]....
So if "SquishIt.Framework" namespace is added on Web.Config why do I need to have the @using on the view?
View 4 Replies
Jan 19, 2010
I have an asp:DataGrid with templated columns. Here's one of those columns:
<asp:TemplateColumn>
<ItemTemplate>
<asp:LinkButton ID="btnDetails"
Runat="server"
CommandName="details"
Text="Details"
Font-Size="0.8em"
CommandArgument='a=<%# Eval("a")%>&b=<%# Eval("b")%>' />
<...>
When the command fires, the CommandArgument comes back unevaluated - it is the string a=<%# Eval("a")%>&b=<%# Eval("b")%>, not a=5&b=6 as I want. What's wrong with how I'm doing this?
View 2 Replies
Oct 31, 2010
Is there any way to use placeholder similar to WebForms in NVelocity View Engine (.vm files)? Today I've got a component containing everything for the <head>, but I wish to specify additional tags from each view page like it can easily be done in ASP.NET WebForms / MVC:
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server"></asp:Content>
If this is not possible directly trough NVelocity View Engine, do I have any other alternatives other than using a blank MasterPage and adding all markup in each view page?
View 1 Replies
Sep 3, 2010
Trying out the Razor view engine and for some reason my generic helper methods are breaking. For example:
public static class UrlHelperExtensions
{
public static string NonGenericHelper(this UrlHelper helper, Type controller)
{
return controller.Name;
}
public static string GenericHelper<TController>(this UrlHelper helper)
{
return typeof(TController).Name;
}
}
Works as expected:@Url.NonGenericHelper(typeof(ProjectEuler.UI.Models.Home))Breaks with the following exception:
@Url.GenericHelper<ProjectEuler.UI.Models.Home>()
"CS1502: The best overloaded method match for 'Microsoft.WebPages.WebPageUltimateBase.Write(Microsoft.WebPages.Helpers.HelperResult)'
has some invalid arguments"
The only workaround I could find is treating it as a "multi-token
statement":
@(Url.GenericHelper<ProjectEuler.UI.Models.Home>())
Not sure if this is the intended behavior or just a bug but it would be nice to be able to call a generic method as you would a non generic one.
View 2 Replies
Feb 7, 2011
Inside VS 2010 I do not have any intellisense working. I have reinstalled everything and still nothing is coming up for intellisense?
View 2 Replies
Jul 14, 2010
I just downloaded and installed Web Matrix beta.
I am really liking the razor view engine.
Not so much the Web Matrix IDE.
Is there any way to install razor view engine for use in the Visual Studio without installing WebMatrix?
View 4 Replies
Nov 15, 2010
how do I change the view engine from aspx to razor in an existing project? If I just change the file extension to cshtml I always get "The controller for path '/path/About' was not found or does ..."
View 2 Replies
Aug 30, 2010
Where i can find documentation about expressions and syntax of WebForms view engine?And what is the difference between <%: expression %> and <%= expression %>
View 2 Replies
Oct 15, 2010
On my projects I am using Razor View engine and I need to define custom Partial folders:
[Code]....
I had this because there was a problem in MVC 3 Preview. Was it corrected?
How should I register the Partial Views in MVC 3 Beta?
View 1 Replies
Nov 11, 2010
We have a modular architecture where we have some views (cshtml) files in a separate project (class library). How can we get the syntax highlighting and autocomplete to work when the project isn't an MVC project?
note that the class library has controllers, views, models etc. It just doesn't have the web.config, global.asax, etc that a normal mvc project would have.
The intellisense works for everything but the so important model:
With MVC3 RTM, if you hover over the Model, you can now get a better error message:
[code]....
Then after adding the build provider, this error message appears:
[code]....
View 3 Replies