asp.net-mvc

What's the best WYSIWYG editor when using the ASP.NET MVC Framework?

Hi, Was wondering what the best WYSIWYG editor that I can embed in a web-site based on the ASP.NET MVC Framework? Ideally it should be Xhtml compliant and allow users to embed images etc. The only one I've used before is the FCKEditor, how well does this work with the MVC - has anyone tried...? My main requirements are: Xhtml compli...

ASP.NET MVC - Deployed on IIS6, stops loading after session start

Reaching out here... I have an ASP.NET MVC app, which runs flawlessly on VS2008 dev server and IIS7. However, deploying on IIS6 yields blank pages and no error message in event logs either. Very frustrating! I've tried the wildcard mapping techniques, extension based routing ({controller}.aspx/{action}) and every config variation I coul...

URL-encoded slash in URL

My Map is: routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with params new { controller = "Home", action = "Index", id = "" } // Param defaults ); If I use the URL http://localhost:5000/Home/About/100%2f200 there is no matching...

How do I unit test my asp.net-mvc controller's OnActionExecuting method?

I've overridden my controller's OnActionExecuting method to set some internal state based on the executing filterContext. How do I test this? The method itself is protected so I assume I'll have to go higher up in the call stack. What code do I need to test this? I'm using mvc RC 1. Edit: I'm also using nunit. Thanks ...

jQuery BlockUI vs. jqModal

I need a modal windows that tells the user to wait until I've finished some work on the server. Looks like both BlockUI and jqModal can do this. Do you have any experiences with any of them? Pros and cons? I'm using ASP.NET MVC. ...

Implement ASP.NET MVC View Engine for pre-processing

I would like to implement a ASP.NET MVC View Engine to perform some pre-processing of the original .aspx/.ascx. file. Then, I want to pass the result to the default view engine (typically the WebForm View Engine). This means, the default View Engine shouldn't read this file from disk, since this is not yet processed. Instead, i would wa...

Asp.NET MVC Model Binding - Using Bind Parameter Attribute to assign a prefix for a simple type

I have a .net mvc app with an controller action which accepts user registration posts. I have the following UI fields: emailaddress, firstname, lastname, password, and confirmpassword. Some of these fields do not belong to a model object (i.e. confirm password does not belong to the user model, only password). My registration form resi...

injection user control depending on radio button choice (ASP.NET MVC)

I have this Create Event form (asp.net mvc), and i have to change some parts of the form, depending on user's choice. When the user clicks radio buttons, different user controls (ascx files) should be injected inside the form hopefully using Ajax. Any suggestions to do this? ...

how do i access query string params in asp.net mvc?

I want to have different sorting and filtering applied on my view I figured that i'll be passing sorting and filtering params through query string <%= Html.ActionLink("Name", "Index", new { SortBy= "Name"}) %> this simple construction allows me to sort. view comes back with ?SortBy=Name in query string now i want to add filtering...

Model binding of nested properties in asp.net mvc

I'm wanting to get some binding working in my mvc application. I find nested properties are not automatically bound by the default model binder in the RC1 release of asp.net mvc. I have the following class structure: public class Contact{ public int Id { get; set; } public Name Name { get; set; } public string Email { ...

Possible bug in ASP.NET MVC with form values being replaced.

I appear to be having a problem with ASP.NET MVC in that, if I have more than one form on a page which uses the same name in each one, but as different types (radio/hidden/etc), then, when the first form posts (I choose the 'Date' radio button for instance), if the form is re-rendered (say as part of the results page), I seem to have the...

ASP.NET MVC controller actions design question

I really like the way ASP.NET MVC works. I'd love to implement it on all new web projects moving forward, but I hit a snag in a prototype the other day that I really haven't found a good solution for, so I ask you, how would you design an MVC app that doesn't fit the typical REST pattern? As an example, the prototype I was designing woul...

ASP.NET MVC, MVCContrib, Structuremap, getting it working as the controllerfactory?

I'm trying to get structuremap to correctly create my controllers, I'm using DI to inject an INewsService into a NewsController and thats the only constructor I have. public class NewsController : Controller { private readonly INewsService newsService; public NewsController(INewsService newsService) { this.newsService ...

MailDefinition's CreateMailMessage owner from ASP.Net MVC Controller

What do I send as the owner for a MailDefinition.CreateMailMessage() sent through an ASP.Net MVC Controller? // owner: // The System.Web.UI.Control that owns this System.Web.UI.WebControls.MailDefinition. public MailMessage CreateMailMessage(string recipients, IDictionary replacements, Control owner); Edit: sending a new System...

Element 'title' occurs too few times, XHTML validation warning in ASP.NET.MVC master page.

I am getting the following XHTML validation warning in my ASP.NET MVC master page: Validation (XHTML 1.0 Transitional): Element 'title' occurs too few times. The title tag for the master page is included in the ContentPlaceHolder in the head tag as shown in the code below. The title tag in the ContentPlaceHolder is not taken into acco...

Best way to update a LINQ model coming from a form

I'm designing forms in my ASP.NET MVC application that will receive objects. Here's what a typical edit action looks like: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Edit(int id, Person person) { peopleService.SavePerson(person); return Redirect("~/People/Index"); } The SavePerson call in the ser...

ASP.NET MVC and trace output bugs out

I haven't been able to find much about this but am I the only one that noticed if you enabled tracing output in an ASP.NET MVC project it outputs the whole trace output once per every MVC user control? ...

Why not have the Scripts folder inside of the Content folder for ASP.NET MVC project?

Out curiosity I was wondering if there was a logical reason to have the Scripts folder not a sub folder of the Contents folder in an ASP.NET MVC project. The Contents folder typically contains your style sheets and images and for some reason it would seem natural to me to also include the Scripts folder in there as well. ...

Html.ActionLink as a button or an image, not a link

In the latest (RC1) release of ASP.NET MVC, how do I get Html.ActionLink to render as a button or an image instead of as a link? ...

How do I repopulate everything in a wizard style page for ASP.NET MVC?

I've got a page that creates a ticket in our help desk system. It acts as a wizard with the following steps: Step 1 User selects the customer from a dropdown list. There is a jquery onchange event that fires and generates the list for step 2 and hides the step1 div and shows the step2 div. Step 2 User selects the location from ...