asp.net-mvc-2

how to install Microsoft MVC 2.0 System.Web.Mvc.dll own resources files?

Hi everyone, by default, MVC 2.0 come with an english resource file in the System.Web.Mvc.dll. When you install the french version of Visual Studio 2010 (and probably other languages), it will add a localized resource file for this language in C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 2\Assemblies\fr\System.Web.Mvc.resources.dll. ...

Is there a definitive or idiots guide to implementing strong web security using ASP.Net MVC 2/SQL 2008?

Hello. I'm about to begin building an e-commerce website using c#, ASP.Net MVC 2, IIS7 and SQL 2008. The site will allow users to login, make purchases, and manage their orders. Obviously, there's a need for strong security here. I've been searching around on SO and Google for a single definitive guide that covers enough on security ...

Are nested Areas possible in ASP.NET MVC 2?

I would like to create a project structure with nested areas. For instance I have a "Home" area and underneath this I would like the "News" area that handles it's own route registration and will properly find views when a route points to a controller in the "News" area. By changing the "News" area name to be "Home/News" instead of simp...

Request.Form as array

Greetings. I have some inputs dynamically added to form. <input name="input_names[]" /> When form was posted, I can get these names like this: var names = Request.Form["input_names[]"]; And I've got CSV string. It's not a problem and I can split it by comma. Problem happens when I write down text which includes comma. Then I canno...

Asp.net mvc with entity framework problem : creating or updating an address for a contact . Address Fill with Ajax Request.

I have 2 related entities: Contact and Address. There is a relation between each other. 1 Contact with 1 Address. In the create Form, I fill the FirstName and LastName text boxes. I have a field related to the address. In some situations, I perform an AJAX request to fill automatically the Address Info. The problem is: when I click s...

Html.Action asp.net mvc

Hi Experts, I am working on a website (Asp.net mvc), where I have multiple partial views. One of the views is user information and then below there are few other views say books by the user, articles in a given book etc. thats how my controller looks like. public class UserController : Controller { public ActionResult UserInfo(lon...

Can we change the route formate in MVC 2 asp.net .

Hi, As i read about url routing from : http://www.codethinked.com/post/2008/08/20/Exploring-SystemWebRouting.aspx I found , "Each url coming into the application will be matched against the list of Routes that you have defined, and if one matches then it will be used" Is this means we can define our own patterns of urls? except "Contro...

Is it necessary to know ASP.NET before learning ASP.NET MVC 2 ?

Hi, I've begun reading an excellent book on ASP.NET MVC 2 by Manning Press. In the early part of the book, the authors imply understanding ASP.NET 3.5/4.0 is good for building ASP.NET MVC 2 concepts on top. I am an intermediate developer - should I cover ASP.NET first or can I get by ? Thanks, Scott ...

ASP.NET MVC2: modifying master css property depending on query string parameter

I am migrating a web site to a new one using ASP .NET MVC2. In the original site, master page has code-behind to check a query string parameter value. Depending on this value, code-behind dynamically modify some CSS property to hide / display master page elements. As MVC2 has no code-behind because we are supposed to perform everything...

How to get the version of the jQuery jqGrid used in Craig Stunz's demo source code?

I download Craig Stunz's demo application from his blog and want to update it to the latest version of jQuery jqGrid but don't know how to get the current version in the source code. Please help! ...

Windsor container components not available on first controller action

Hi there, I'm using a configuration within the global.asax.cs to register the components but it looks the container hasn't been initialized yet at the first http request (HomeController > Index action) and it gives me a "The ObjectContext instance has been disposed and can no longer be used for operations that require a connection." erro...

Is it possible to rename the Areas folder?

is it possible to rename Areas folder? Or to extend the AreaRegistration.cs to look for a custom folder? what i need to do to rename Areas folder. ...

IIS6 with IE8 not loading ASP.NET MVC site properly

This is odd, and I hope I explain it correctly. When I debug locally with VS2008, IE8 looks like FF and Chrome (minus the obvious). It works well, and I'm happy. When I use IE8 with our IIS6 box (Win2003) or Cassini, buttons aren't aligned, javascript errors occur, and some other CSS anomolies occur: Table cells missing colored bor...

How to update a usage of jQuery jqGrid version 3.5 to the current version 3.7.2 ?

Let's say we have the jqGrid in our ASP.Net MVC 2 application, e.g. Craig Stuntz's demo source code on his blog, and we want to update the grid's codes to version 3.7.2 (currently when this question is being asked). How can I do it? Which steps should be followed? I found here from the internet (trirand.com) but there's nothing related ...

Why do i get input-validation-error class on a textbox because i don't have that class in the whole project?

I have something like this <%using (Html.BeginForm("X", "Y", FormMethod.Post, new { id="Z" })) { %> <table align="center" style="width:70%;margin-bottom:15px;" cellspacing="5px";> <tr> <td width="40%">Nr.:</td> <td width="60%"><%=Html.TextBox("Nr", Model.Nr, new { width = 130, maxlength = 10 })%></td>...

Are there any tools for generating a WADL file?

I've built a RESTful web service (I'm using asp.net 4, MVC 2) and I want to expose a WADL. Are there any tools built in or otherwise that I can use to build it? I'm not looking (yet) to generate classes to consume it I'm looking strictly for something that can generate the WADL file itself. Thanks. ...

How to make the column auto resized corresponding to cells' values in that column?

Let's say we have the jqGrid in our ASP.Net MVC 2 application, e.g. Craig Stuntz's demo source code on his blog. I want to make to columns auto-resized but don't know how to do it. Please help! ...

Why would I use WCF instead of MVC when building a RESTful api?

Possible Duplicate: Which to choose: ASP.NET MVC or RESTful WCF? I'm trying to figure out when I would ever want to use WCF to build restful services instead of something much less complex like ASP.Net MVC? With MVC I can easily control the urls and the output. With WCF there's an increadible amount of know-how and complexity ...

Rendering issue using SelectList from manually defined SelectListItems in MVC 2

I am using ASP.NET MVC 2 (.NET 3.5), and need to manually define what shall be an Options list. When I do so I get a drop down menu, with each of the manual entries reading 'System.Web.Mvc.SelectListItem'. My view model defines the list as such: public SelectList YesNoList { get { List<SelectListItem> tmpLis...

How do I get the correct URL for an MVC action when using Jquery/AJAX?

So I have my first MVC2 site that I'm working on and naturally I'd like to throw some AJAX in there. The problem is, is that I don't know how to get the URL for the action when passing in a URL parameter. Let me explain. The examples I've seen so far show the developer passing in strings like '/MyController/MyAction'. That's great, e...