Razor view

Dec 10, 2010 at 4:32 PM

Are you planning to switch and/or support razor views any soon?

Dec 10, 2010 at 4:48 PM
Edited Dec 10, 2010 at 6:33 PM

I know ppl that already use it in razor views (so it's usable in razor already),

I'm going to switch my live demo to razor after the release of mvc3

Dec 28, 2010 at 4:29 PM

Hey o,

Have you tried converting your demos over to Razor yet?  I'm testing your project with Razor views and I get following errors when I try and use Html.MakePopupForm() :

System.Web.HttpCompileException: c:\Users\Lcranf\Documents\Visual Studio 2010\Projects\SharpSpeech\SharpSpeech\Views\Student\Index.cshtml(14): error CS1502: The best overloaded method match for 'System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)' has some invalid arguments

Dec 28, 2010 at 6:48 PM

I did a simple demo with razor and it worked,

try exactly the same thing with aspx see if it works that way

Jan 25, 2011 at 8:12 PM

Hi there.

I'm trying out ASP.NET MVC Project Awesome for the first time this evening. I'm using an MVC 3 project with the Razor view engine and I've experienced problems getting things to work.

I followed the instructions on getting Awesome set up in a project, that went fine. My first experiment was to build a popup form using:

@Html.MakePopupForm<HomeController>(o => o.Hi(), width100height200title"lookup and ajax dropdown")

When I ran the code, I got the same exception as lcranf mentioned in his post above. After some research, I changed my code to this:

@{ Html.MakePopupForm<HomeController>(o => o.Hi(), width100height200title"lookup and ajax dropdown"); }

and it ran. Razor has an issue when you are calling generic methods, putting them in a { } or ( ) should do the trick. Problem is, although my site is running, nothing is rendered on the page for the popup link.

Is there something I am doing wrong here?


Jan 25, 2011 at 8:40 PM
Edited Jan 25, 2011 at 8:41 PM
use ()
Html.MakePopupForm<HomeController>(o => o.Hi(), width100height200title"lookup and ajax dropdown"))
you can see lots of these ones in the live demo