asp.net-mvc-2

Building MVC 2 Areas into seperate assemblies

Is it possible to have the areas as part of the MVC project but to be built into their own individual assemblies? ...

advise how to implement a code generator for asp.NET mvc 2

Hello, I would like your advice about how best to solve my problem. In a Web server is running. NET Framework 4.0. Whatever the methods and technologies you would advise me. applications built on the basis Asp.NET MVC 2. I have a database table in MS SQL Server. For each table in database, I must implement the interface for viewing, ed...

Are MVC2 areas with multiple projects supported in the final release?

I had been following this guide to get areas with multiple projects setup: http://msdn.microsoft.com/en-us/library/ee307987(VS.100).aspx I was stumbling on the step where you modify the .csproj files to enable the AfterBuild configuration. My googling led me to this post from Steve Mosely: http://avingtonsolutions.com/blog/post/2010/04...

ASP.NET MVC 2 controller-url problems

I am still very new to the MVC framework, but I managed to create a controller that reads from a database and writes JSON to an url; host.com/Controllername?minValue=something&maxValue=something However when I move the site to a subfolder; host.com/mvc/ it doesn't seem to be able to call the controller from there when I do it like ...

ModelBinders, complex nested Types and Interfaces

Hi, I've a scenario where I need to bind to an interface - in order to create the correct type, I've got a custom model binder that knows how to create the correct concrete type (which can differ). However, the type created never has the fields correctly filled in. I know I'm missing something blindingly simple here, but can anyone tel...

asp.net authentication in a web farm

We need to implement authentication for an ASP.Net MVC project and are looking at the ASP.Net authentication framework to see if it will work. One concern is that apparently it stores the UserID in the session. I just got off the tel with Microsoft, and they advised that in a web farm scenario we would need a state server, and that the...

How do the httppost, httpput etc attributes in ASP.NET MVC 2 work?

In ASP.NET MVC 2, a couple of new action filter attributes were introduced, as "shorthand" for attributes in ASP.NET MVC 1; for example, applying the HttpPostAttribute does the same thing as applying [AcceptVerbs(HttpVerbs.Post)] to an action method. In addition, with the more verbose syntax, it is possible to combine different methods,...

Is a Multi-DAL Approach the way to go here?

Working on the data access / model layer in this little MVC2 project and trying to think things out to future projects. I have a database with some basic tables and I have classes in the model layer that represent them. I obviously need something to connect the two. The easiest is to provide some sort of 'provider' that can run operatio...

asp.NET Dynamic Data Site and asp.NET MVC-2 site together

Hi, I have created firstly ASP.NET MVC 2. and write more functionality. After I create asp.NET Dynamic Data Site. now, when I click on run button in Visual Studio, mvc app. opened in browser as http://localhost:50062. and asp.NET Dynamic Data Site as http://localhost:58395/cms/. but i want to merge this app. in one. can I use asp.NET ...

Is there any way to profile the performance of views in ASP.NET MVC?

Hi, I am profiling my MVC app and the speed from the Performance Explorer is around 500 ms (50 ms code, 450ms SQL roundtrips that won't exist in deployment). However, the time taken waiting on a response to a GET request is around 1200ms. I've managed to discover through trial and error that this is due to a particularly slow partial ...

Creating a music catalog and extracting first 30 seconds as soon as the first words are sung

I already read a question: Separation of singing voice from music. I don’t need this complex audio processing. I only need some detection mechanism that would detect that there is some voice/vocal playing while the music is playing (or not playing) I need to extract first 30 seconds when a vocalist starts singing along with full band m...

ASP.NET MVC Html.ActionLink Maintains Route Values

Hi, I have a question that has pretty much been asked here: http://stackoverflow.com/questions/780643/asp-net-mvc-html-actionlink-keeping-route-value-i-dont-want However, the final solution is a kludge, pure and simple and I really would like to understand why this happens, if someone can please explain it to me? For completeness, it...

MVC2, data annotation with Entities?

Is there any way to use an Entity as a model, and be able to decorate its fields in order to get validation? I am using the Entity as a model for convenience, but then I need to do all the validation manually... ...

MVC2 Annotations dll not found by VS2008 compiler, how do I make it look in the right place?

I have VS2008 SP1 running with .NET 3.5 SP1 I have MVC2 running (with MVC1 uninstalled) All works ok except when I call the System.Components.DatAnnotations.dll, then the compiler complains of not being able to find it. Message is: Could not load file or assembly 'System.ComponentModel.DataAnnotations, Version=99.0.0.0, Culture=ne...

ASP.NET MVC 2 loading partial view using jQuery - no client side validation

I am using jQuery.load() to render a partial view. This part looks like this: $('#sizeAddHolder').load( '/MyController/MyAction', function () { ... }); The code for actions in my controller is the following: public ActionResult MyAction(byte id) { var model = new MyModel { ObjectPro...

Adding a jQuery Datepicker to a dynamically added <input>

I have a method that creates a form in my controller: ... sbReturn.Append(String.Format("<p id='planSetupAddNewEffectiveDate'>")); sbReturn.Append(String.Format("<label for='txtPlanSetupAddNewEffectiveDate'>Effective Date </label>")); sbReturn.Append(String.Format("<input type='text' id='txtPlanSetupAddNewEffectiveDate' class='plansetup...

Why does this ActionFilterAttribute not import data to the ViewModel?

I have the following attribute public class ImportStatusAttribute : ActionFilterAttribute { public override void OnActionExecuted(ActionExecutedContext filterContext) { var model = (IHasStatus)filterContext.Controller.ViewData.Model; model.Status = (StatusMessageViewModel)filterContext.Controller.TempData["status...

How to add additional data column in EF using ASP.Net MVC 2

My Table: [LocationId] [Address] [ZipCode] When I show a list of Location's, I also want to show the distance from a given zip code. In Asp.Net Web Forms I had a stored procedure that would return the distance and I would call this SP on ItemDataBound on my GridView. Or, I also would have my SP that is returning the Location list...

MVC2 MSchart with detail grid

Hello, I need the capability to display a chart, click on a region and display the details in a jqgrid on the same page. I tried using a pie Chart and I can't seem to capture or create a click event for the chart. The data points contain a .url property which I can redirect to a different page but I need to display details on the same...

ModelState always valid

I've got something seemingly very simple not working. I have got a model public class Name: Entity { [StringLength(10), Required] public virtual string Title { get; set; } } public class Customer: Entity { public virtual Name Name { get; set; } } a view model public class CustomerViweModel { public Customer Customer...