asp.net-mvc

How to save multiple entry for one entity in the same batch . Entity - Relation(One to Many) concept is use in my example.

Here is a common scenario I Have these Entity User UserId UserName ... UserQuestion UserQID UserID UserQuestion UserAnswer When the user first logon, he need to create 3 customs Answer / question. How can I Create these 3 questions relation and save it to database. I Want these questiona in relation with the specific user. ...

Where to put third-party plugins/libraries in ASP.NET MVC

I'm using the markItUp! jQuery-based editor in an ASP.NET MVC project. I understand the purpose of the various default folders in ASP.NET MVC, but I'm not sure how a third-party plugin like markItUp! fits into this structure. markItUp! has its own images, CSS files, and scripts, but instead of separating those files into the existing p...

Is this a good way to manage Disposable objects in ASP.NET MVC?

I am overriding the Controller.Dispose(bool) method in my ASP.NET MVC2 Controllers in order to dispose of things as needed, while leaving them alive for as long as possible. This is as opposed to disposing of them prior to returning from the Controller's action method. My question, in short; does this work as I expect? From what I'm se...

Re-using a partial view (ascx) across different Controllers and Views

Let's assume I have 2 Controllers, TopicsController and PostsController. For each controller, I have a couple of views (Index & Details). The Topic (Index) view inherits System.Web.Mvc.ViewPage<IEnumerable<MessageBoard.Models.Topic>> The Topic (Details) view inherits System.Web.Mvc.ViewPage<MessageBoard.Models.TopicFormViewModel> I'm ...

Multiple websites from a single service and model layer

I want to do something similar to stackexchange but with their own domain. I want to have 1 single database, repository/model layer, service layer on 1 server. Then on a different server or same server, I have a web project which can access those layers. Is there a way to achieve this without a hit in performance on these sites? I'm th...

Extending MVC TemplateHelper / DisplayFor* methods - should I be doing that?

So in MVC3 beta, I'm looking for a controllable way to use a different set of display templates than those I've put in the DisplayTemplates folder. Probably easiest to just say exactly what I'm trying to do, using stackoverflow as an example: On the details page, you can imagine that you would have: Html.DisplayForModel() // Uses the...