asp.net-mvc

ASP.net MVC on EC2

Does Amazon EC2 support ASP.net MVC? ...

MVC ModelBind ListBox With Multple Selections

How do I submit the ListBox selections to the ModelBinder? <%=Html.Hidden("response.Index",index)%> <%=Html.ListBox("response[index].ChoiceID", new MultiSelectList(gc.choice,"ChoiceID","ChoiceText") )%> 'gc.choice' is a List I can get the fisrt selected value to the model, but not the second selection presumably bec...

ASP.NET MVC and Mootools

Do you know of any examples of MooTools and ASP.NET MVC? ...

Why should I use inline coding to develop MVC ASP.NET?

I reviewed some examples about MVC ASP.NET and all of them use the inline coding method. Is there a big reason to use this method and ignore my preferred code behind method? ...

Compile Views in ASP.NET MVC

I want an msbuild task to compile the views so I can see if there are compile time errors at well... compile time. Any ideas? ...

ActionLinks doesn't always work in FireFox and Safari

I've been learning the new ASP.NET MVC framwork lately and I've developed a test site for a friend who runs a "light café" in Sweden. The plan is to release it within a week or so after performing some final adjustments and fixing some security issues. Yesterday I published the site to a webhost running IIS 6, so the first thing I had ...

ASP.net MVC Baffling RunTime Error

The following code: <% foreach (var product in ViewData.Model) { %> <%= Html.RenderPartial("~/Views/Shared/ProductSummary.ascx",product)%> <% } %> Throws an httpCompileException with the following detail: The best overloaded method match for 'System.IO.TextWriter.Write(char)' has some invalid arguments I confess myself ...

asp.net mvc: page can not found

I'm trying to setup the MVC development enviroment on my laptop. I'm running WinXP Pro with IIS 5.1 I got the environment setup with the sample MVC application that come with beta. I can only get to the home page. when i try to open About us page. i run into the page can not be found error. Is it the routing not set in the Global.asax? ...

Can I make money if I release my CMS as opensource

I have a CMS that I've written in ASP.NET. It still needs work and I'm thinking of releasing it as opensource. I'm just not sure how I want to handle this in the future. If I release it now as opensource, can I still release a commercial version? What other ways are there for me to make money on the CMS? ...

Return Json to jQuery with ASP.NET MVC

I have this code.. Models.Person p = new testmvc.Models.Person { Firstname = "yongeks", Lastname = "ucab" }; Models.Person p2 = new testmvc.Models.Person { Firstname = "lyn", Lastname = "torreon" }; string q = JavaScriptConvert.SerializeObject(new String[] { JavaScriptConvert.SerializeObject(p), JavaScriptConve...

JQuery UI datepicker in Asp.Net MVC

I have tried to use some of the widgets in JQuery UI on an Asp.Net MVC site without luck. For example the basic datepicker from jQuery UI - functional demos. I have created a simple MVC project and added the script references in Site.Master like this: <script src="../../Scripts/jquery-1.2.6.min.js" type="text/javascript"></script> <sc...

How to do a custom asp.net routing (hardcoding the controller)

I'm trying to create a route for the following urls: www.mysite.com/user/username www.mysite.com/user/username/pictures I tried doing that with the following code: routes.MapRoute( "UserProfile", "user/{sn}/{action}", new { controller = "User", action = "Index", sn = "" } ); So if an action...

Asp.Net MVC - Best approach for "dynamic" routing

I am trying to come up with an approach to create "dynamic" routing. What I mean, exactly, is that I want to be able to assign the controller and action of a route for each hit rather than having it mapped directly. For example, a route may look like this "path/{object}" and when that path is hit, a lookup is performed providing the app...

Caching in asp.net-mvc

I would like to cache my most database heavy actions in my asp.net-mvc site. In my research I have found donut caching on Phil's blog Caching/compressing filters on Kazi's blog Scott Hansleman's podcast about how they cached things in SO. But I don't feel I get it yet. I want to be able to cache my POST request depending on several ...

How to enable ASP.Net MVC item templates for S#arp Architecture project

I've been playing around with creating an application using the S#arp Architecture. One thing that is bugging me a bit is that I don't have access to any of the ASP.Net MVC item templates from the "Add New Item..." dialog. In other words I can't, for example, create a new "MVC ViewPage" or "MVC Controller" directly from the "Add New Ite...

ASP.NET MVC - TempData - Good or bad practice

I'm using the AcceptVerbs method detailed in Scott Gu's Preview 5 blog post for dealing with form entries in ASP.NET MVC: User gets an empty form via GET User posts the filled in form via POST to the same Action The Action validates data, takes appropriate action, and redirects to a new view So I don't have to use TempData. That sai...

Why would ASP.NET MVC use session state?

Recommended by the ASP.NET team to use cache instead of session, we stopped using session from working with the WebForm model the last few years. So we normally have the session turned off in the web.config <sessionState mode="Off" /> But, now when I'm testing out a ASP.NET MVC application with this setting it throw an error in class...

Steve Sanderson's "Partial Request"

I have followed the blog post written by Steve Sanderson at blog.codeville.net/2008/10/14/partial-requests-in-aspnet-mvc. It all work fine when follow it exactly but I was hoping that someone may have looked at it and be able to assist me in adapting it slightly. I basically have this "partial request" calling from one controller to ano...

How do you create a dropdownlist from an enum in ASP.NET MVC?

I'm trying to use the Html.DropDownList extension method but can't figure out how to use it with an enumeration. Let's say I have an enumeration like this: public enum ItemTypes { Movie = 1, Game = 2, Book = 3 } How do I go about creating a dropdown with these values using the Html.DropDownList extension method? Or is my...

MVC where to render menu view

Hi, here's what I'm trying to do : On a page, I would have a LeftMenu that would be independent of the page, and a RightMenu that would depend on the page the user is currently on. I want to use MVC from asp.net. I could use RenderPartial to render the menus but on the other hand, the View shouldn't really handle this - so it seems to ...