Questions tagged [mvccontrib]

This project was designed to add functionality and ease-of-use to Microsoft's ASP.NET MVC Framework, MVC Contrib is useful for developers looking to develop and test UI elements on top of the ASP.NET MVC framework.

MvcContrib adds functionality and ease-of-use to Microsoft's ASP.NET MVC Framework. It is primarily intended for use by developers of UI elements that target ASP.NET MVC.

Installation

MvcContrib can most easily be installed through its NuGet package.

Install-Package MvcContrib
311 questions
433
votes
21 answers

Reflecting parameter name: abuse of C# lambda expressions or syntax brilliance?

I am looking at the MvcContrib Grid component and I'm fascinated, yet at the same time repulsed, by a syntactic trick used in the Grid syntax: .Attributes(style => "width:100%") The syntax above sets the style attribute of the generated HTML to…
Remus Rusanu
  • 288,378
  • 40
  • 442
  • 569
126
votes
11 answers

ASP.NET MVC partial views: input name prefixes

Suppose I have ViewModel like public class AnotherViewModel { public string Name { get; set; } } public class MyViewModel { public string Name { get; set; } public AnotherViewModel Child { get; set; } public AnotherViewModel Child2 {…
queen3
  • 15,333
  • 8
  • 64
  • 119
22
votes
2 answers

Multiproject areas in ASP.Net MVC 3

Does any one have any idea about multiproject area support in asp.net mvc 3? As it was degraded to future status in mvc 2. If it is still not included then should we look forward for ASP.Net MVC Portable Areas via MvcContrib. Can you share your…
19
votes
4 answers

Does .NET MVC have a strongly typed RedirectToAction?

Since I have decided to let RC go while staying with Beta for now, I have no way of knowing whether a strongly typed RedirectToAction has been added. Has anybody tried it and is there a strongly typed RedirectToAction (and maybe ActionLink) in RC?
User
  • 30,403
  • 22
  • 79
  • 107
18
votes
5 answers

ASP.NET MVC 3: DefaultModelBinder with inheritance/polymorphism

First, sorry for the big post (I've tried to do some research first) and for the mix of technologies on the same question (ASP.NET MVC 3, Ninject and MvcContrib). I'm developing a project with ASP.NET MVC 3 to handle some client orders. In short: I…
jmpcm
  • 1,814
  • 2
  • 19
  • 27
16
votes
3 answers

ASP.NET MVC 3, Razor Views, and Portable Areas

I am trying to using portable views with ASP.NET MVC 3 and razor views as that seems like the best way to create an easy plug-in architecture. So I have my class library setup and I have my view located in /Views/Admin/Index.cshtml and it is set as…
ryanzec
  • 27,284
  • 38
  • 112
  • 169
14
votes
3 answers

How to deal with more than one value per key in ASP.NET MVC 3?

I have the following problem: one of the system I'm working in most important features is a search page. In this page I have some options, like records per page, starting date, ending date, and the problematic one: type. One must have the…
Bruno Machado - vargero
  • 2,690
  • 5
  • 33
  • 52
12
votes
2 answers

Use MVCContrib grid for editing

I just started using the MVCContrib grid in a test project. I'm having a difficult time finding information on how to use it for edit/update/delete. Can anyone point me to information on how to put a row into edit mode, or if there isn't such a…
jlembke
  • 13,217
  • 11
  • 42
  • 56
12
votes
1 answer

how to apply css class to mvccontrib grid

I am using mvccontrib grid in asp.net mvc(C#) application. How can i apply css class to the grid thats created for the mvccontrib grid Attributes? I am looking to construct like: ....
By…
Prasad
  • 58,881
  • 64
  • 151
  • 199
12
votes
2 answers

MVC4 and MVCContrib

Does MVCContrib currently support MVC4? I am having a first look at switching a project from MVC2 to MVC4 and having some issues with Portable Areas.
user517406
  • 13,623
  • 29
  • 80
  • 120
11
votes
2 answers

MVC3 doesn't recognize MvcContrib namespace in Razor View

I'm trying to paginate something with MvcContrib's Html.Pager(), but my razor views can't reference the right namespace. Controller is ok: using MvcContrib.Pagination; ... public ActionResult List(int? page) { return View(new…
David Fox
  • 10,603
  • 9
  • 50
  • 80
10
votes
1 answer

How to style rows in the MVCContrib Grid based on their data?

I am tinkering with the MVCContrib Grid and am stuck on how to format a row of data in the grid based on the data. For example, say we have a grid of products, where each product has data fields like name, price, and discontinued. I'd like to…
Scott Mitchell
  • 8,659
  • 3
  • 55
  • 71
10
votes
1 answer

MVC Contrib VerificationException

I have read this post and I wanted to use ControllerExtensions.RedirectToAction method. But I have System.Security.VerificationException Which says: type argument '[MyController type]' violates the constraint of type parameter 'T'. My controller is…
Serhiy
  • 4,357
  • 5
  • 37
  • 53
10
votes
1 answer

Does MVC Contrib fulfill its promise of increasing productivity in ASP.NET MVC

I am knee deep in starting a new ASP.NET MVC project. Several tutorials have recommended the use of MVC Contrib. I wanted to get the opinion of the Stack Overflow community if it fulfilled its promise of increasing productivity with ASP.NET MVC.…
ahsteele
  • 26,243
  • 28
  • 134
  • 248
10
votes
3 answers

MvcContrib grid and checkboxes

Lets say I render a Checkbox: @Html.CheckboxFor(x => x.Checked) // Checked is true by default ASP will turn that as:
1
2 3
20 21