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
4
votes
2 answers

MvcContrib Grid Sorting on complex object

I am trying to work with MvcContrib Grid control. But I cannot seem to get the sorting to work on complex objects that hold other objects. I have setup my controller/classes/Views similar to the OP in this question. Sorting with MVCContrib I have…
SimpleUser
  • 1,341
  • 2
  • 16
  • 36
4
votes
2 answers

MvcContrib.Mvc3-ci 3.0.75.0 breaking change?

Just updated from MvcContrib.Mvc3-ci 3.0.73.0 to 3.0.75, and the previously working plain ViewUserControl threw a runtime exception: The model item passed into the dictionary is of type 'System.String', but this dictionary requires a model item of…
Akos Lukacs
  • 2,007
  • 1
  • 16
  • 21
4
votes
2 answers

How to add a css class to MVCContrib grid

I tried: @Html.Grid(Model.PagedList).Columns(column =>{ column.For(m => m.Name).Attributes(@class => "test"); }) But that just added it to the tag inside the grid.
Steven
  • 18,761
  • 70
  • 194
  • 296
4
votes
2 answers

MvcContrib FluentHtml With Razor?

I'm wondering does the latest release of MvcContrib work with the Razor view engine? I referenced the MvcContrib assembly and the FluentHtml assembly, then I added the required namespace to the ~/View/Web.config as suggested here by Darin. But…
Kassem
  • 8,116
  • 17
  • 75
  • 116
4
votes
1 answer

MVCContrib Grid - how to add and delete rows with ajax?

I'm wondering what's the best strategy to delete a row in MVCContrib generated grid. Consider this grid: Html.Grid(Model.Proc.Documents).Columns(column => { column.For(c => c.Name).Named("Title"); column.For(c =>…
user315648
  • 1,945
  • 3
  • 22
  • 30
4
votes
1 answer

asp.net MVC: RescueAttribute (mvccontrib) vs HandleErrrorsAttribute?

I recently came across the rescue attribute which is part of the mvccontrib project... At first glance it appeared to allow you to server up different error views depending on controller / actions etc.. But taking a closer look, it also appears that…
mark smith
  • 20,637
  • 47
  • 135
  • 187
4
votes
1 answer

MvcContrib Test Helper problem

I am using MVC2 with MvcContrib HelpTester. I have problem with testing Controllers which are in Areas. Here is my Test class : [TestFixture] public class RouteTests { [TestFixtureSetUp] public void Setup() { …
Bernard Larouche
  • 1,211
  • 2
  • 13
  • 22
4
votes
3 answers

MVCContrib Testing Route with Areas

I am using MVC 2 with Areas. To test routing, I am using MvcContrib. This is the testing code: [Test] public void Home() { MvcApplication.RegisterRoutes(RouteTable.Routes); "~/".ShouldMapTo(x => x.Login("Nps")); } I am not…
user279993
  • 135
  • 6
4
votes
1 answer

MvcContrib ShouldMapTo TestHelper throws AssertionException unexpectedly

I'm getting an expected error with my route testing using MvcContrib's ShouldMapTo function. According to the results, everything is fine, but the helper throws an AssertionException with an unfortunately sparse message. I'm using MVC1 and the…
ARM
  • 2,385
  • 1
  • 13
  • 11
4
votes
3 answers

MVCContrib, Html.Grid: How can I attach a row-based id to a td tag?

Here's my current view code: <% Html.Grid((List)ViewData["Parameters"]) .Columns(column => { column.For(c => c.ID); column.For(c => c.Name); }).Render(); %> I'd like to attach an HTML…
Jim G.
  • 15,141
  • 22
  • 103
  • 166
4
votes
1 answer

Integration testing an MVC application without the pain of UI automation

I'm starting development on a new MVC application that will be largely written using TDD. I'd like to add some integration tests to ensure that the fully wired application (I'm using StructureMap for IOC, NHibernate for persistence) works as…
Mitch A
  • 2,050
  • 1
  • 21
  • 41
4
votes
1 answer

MVCContrib grid - Can I specify tbody attributes?

I'm trying to use MVCContrib grid together with KnockoutJS. To do this I have to specify data binding in tbody, e.g. . I can't find the way how to do this. @Html.Grid(Model).Attributes() applies my binding to…
Lukasz Lysik
  • 10,462
  • 3
  • 51
  • 72
4
votes
2 answers

ASP.NET MVC - Returning data as HTML or XML

When requesting http://someserver.com/user/btyndall I'd like to return HTML When requesting http://someserver.com/user/btyndall?format=xml I'd like to return XML representation of my model I've downloaded MvcContrib. (I can't believe XmlResult is…
BuddyJoe
  • 69,735
  • 114
  • 291
  • 466
4
votes
1 answer

Test ASP.NET MVC routes using MVC Contrib

I'm trying to set up Route mapping tests using MVC Contrib as described in Test ASP.NET MVC routes using MVC Contrib The tests compile and execute, but they always fail with the message "The URL did not match any route." I set up another test to…
CoderDennis
  • 13,642
  • 9
  • 69
  • 105
4
votes
2 answers

How to test an MVC route with optional querystring parameters

I have this controller method: [GET("/whatever/list")] public ActionResult Index(string sortby, string order) I'm trying to test it with MvcContrib route testing: "~/whatever/list".ShouldMapTo(c => c.Index(string.Empty,…
T. Stone
  • 19,209
  • 15
  • 69
  • 97
1 2
3
20 21