Modify A MVC 2.0 Project To Work With The Spark View Engine?

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


Similar Messages:

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

.net - Literals That Precede { In Spark View Engine?

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

Spark View Engine And MVC 2 Strongly Typed Html Helpers?

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

.net - MVC 2, Spark Engine And Strongly Typed Html Helpers?

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

MVC :: Changing View Engine In Existing Project To Razor?

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

Does The Razor View Engine Work For Mono

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

How To Use Razor View Engine Auto-complete To Work In A Class Library

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

Rendering A Spark View To A String?

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

How To Organized Page Specific CSS Link Tags With Spark View Pages

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

MVC 2 SPARK - Create "Add New Item" Link In Spark Page?

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

Configuration :: How To Modify Project Settings At Run Time

Aug 24, 2010

I have several settings in my project area (stored in web.config). However, the scope is not editable and is permanently set to "Application", which means I can't edit them at run time. I would really like to be able to edit these from the web interface. I know that doing so would restart the application (since the web.config was modified), but I'm okay with that, once the settings are written.

Is there any way to programmatically modify the settings in the <applicationSettings><PROJECT.Properties.Settings> area of the web.config?

View 9 Replies

How To Modify Published Project - Adding New Pages

Dec 12, 2012

I published a project called TestSample which has 2 pages page1.aspx and page2.aspx and application dll Test.dll in bin folder.

what i need is, i want to create a new page called page3.aspx and page3.aspx.cs through programmatically which is done by file stream object, my need is to publish this page3.aspx to the TestSample virtual directory and also page3.aspx.cs has to be merged with Test.dll so that code behind should be avoided.

View 1 Replies

Is It Possible To Use Razor View Engine Outside

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

Web Forms :: Modify Existing Class And Reimport Into Project

May 20, 2010

I'm working on an existing web project. All of the classes are in a seperate folder as vb files. I need to modify one to include a delete method. I think I can insert the delete method, my question is how do I update the project to include the modified class. I think that all of the classes are compiled into the project as a .dll which I don't know how to modify. I assume I need to modify the source vb file for the class and recompile?

View 5 Replies

Modify WCF Service To Work With .NET Pages?

Mar 30, 2010

I created a WCF service (.NET 3.5) that grabs data from a db and returns a list of objects. It works just fine. I tested it using the WCFTestClient application and got the desired results.Now, I tried to create an ASP.NET web application and consume the service. After enabling <serviceDebug includeExceptionDetailInFaults="true"/> in the config file, the error message is "Object reference not set to an instance of an object."How do I modify the service to work with ASP.NET?

Update 1 - I created a reference to the service. When I ran my very basic testing app, based on the sample code displayed on the service's default web page, I got the "Object reference not set to an instance of an object" message.The service is returning the correct results when I use the WCF Test Client utility provided with Visual Studio. When I try to use the following code, all in the page_load event, I get the object reference message.

PhoneNumberServiceClient client = new PhoneNumberServiceClient();
// Use the 'client' variable to call operations on the service
List<PhoneNumber> phones = client.GetPhoneNumbers();

// Always close the client.
client.Close();

View 3 Replies

A XAML Based View Engine For MVC?

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

Built An MVC Application Using XSL As The View Engine? 

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

Visual Studio :: Modify - Debug And Deploy 1.1 Project In Vs 2010

Feb 28, 2011

i have a project that is developed in asp.net 1.1. But i have vs 2010 installed...can i modify,debug and deploy from vs 2010.

View 1 Replies

MVC XSLT View Engine With Master Page

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

MVC :: How To Integrate Razor View Engine Into Web Application

Dec 21, 2010

How to integrate Razor view engine into mvc 2 web application?

View 3 Replies

MVC :: Razor View Engine - 'content' From DB Using VirtualPathProvider?

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

MVC :: Razor View Engine And Add Namespace In Web.Config

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

View Engine Won't Execute Code Snippets

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

WebForms Placeholder For NVelocity View Engine?

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







Copyrights 2005-15 www.BigResource.com, All rights reserved