asp.net-mvc

Is there a spell checker for ASP.NET MVC?

Hi, I'm looking for a simple spell checker to use with an text input. My application is being developed in ASP.NET MVC 2 within VS2010. I'm using the 4.0 version of the framework and my application will be accessed via an intranet using IE only. A jQuery plugin would be ideal, but I'm happy to use any solution. A step by step tutorial...

Getting inline css in an ASP.NET MVC page

I have an ASP.NET MVC website running in the windows azure cloud. It includes links in the section like this one: <link href="Content/Case02.css" rel="stylesheet" type="text/css" /> Sometimes the css is delivered within the page (inline) and sometimes it is not. I want to set something so that it is always delivered to the browser ...

Bestpractices: StructureMap and ASP.NET MVC 2 - Setter Injection/Contructur Injection in an abstract base Controller

public abstract class ConventionController : Controller { public const int PageSize = 5; public IMappingService MappingService { get; set;} } How do I set up StructureMap to get the Instance of IMappingService? Edit: With the help of Joshua Flanagan I now have the following code: EmployeeController public class EmployeeCon...

Outgoing http data compression

Hello All, Is anybody know, is it possible to compress my outgoing http data in IE? I perform ajax requests to a server and want to reduce amount of traffic in order to speed up my app. Thanks, Egor ...

tab strip in telerik grid

Hi, In my mvc web application, I am using telerik tab strip for different tabs. Now I want that for each tab , I can call different action method of controller. How Can I do that? ...

Is there a way to instruct ASP.NET MVC about some class metadata other than putting the MetadataTypeAttribute directly on the class?

Here's a sample of how it works now: [MetadataType(typeof(PersonMetadata))] public class Person { public string Name { get; set; } public int Age { get; set; } } public class PersonMetadata { [Required] public string Name { get; set; } [Range(0,150] public int Age { get; set; } } However I don't want the Metad...

MVC Custom Control?

Hello! I am trying to figure out how to use/create a custom control in ASP.NET MVC 2. I created a custom control earlier and compiled it (ccontrol.dll), the control renders a div, textbox and a button + some javascript in order to post a comment on the website. It could be a static aspx page that i wanted to allow my visitors to add a ...

Generating fake istances at runtime

I'm looking for an utility class to generate fake entity instances at runtime. I'm implementing a ASP.NET MVC3 website using EF4 with a code-first approach, so I'd like to run the site before creating any database. The fake instances should contain valid data (hopefully reflecting the various DataAnnotation attributes used in each class ...

C# Problem authenticating webservice between two webapplications

I'm working on a webapplication which runs central at a company. This webapplication needs to make a call to a service which is part of a second webapplication. In the central webapplication i have this piece of code; var clientUri = "http://website.localhost/Services/Info.svc/account"; var uri = new Uri(clientUri); var networkCredenti...

[Solved] ASP.Net MVC deployment on IIS6, why do I get a 404 after enabling wildcard mapping?

Hi all, I have this ASP.NET MVC app that I've deployed on IIS6/Win2003 as a virtual directory, and I get a 404 error even after enabling wildcard mapping for aspnet_isapi.dll (as explained everywhere like http://blog.stevensanderson.com/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/). Why so? In fact, without enabling this, I ge...

ASP.NET MVC - Keeping a controller thin (too many action methods)

I'm working on my first real ASP.NET MVC project and I've noticed that the controller I've been working in is getting rather large. This seemingly goes against the best practice of keeping your controllers thin. I've done a good job keeping the business logic out of the controllers. I use a separate layer for that. Each action primar...

How do I use MVC HandleError attribute with JQueryUI Dialog?

I have HandleError attribute working normally, however: I have a jqueryui dialog that displays a partial view. If i generate an error in this action the dialog just remains blank and no redirect to the Error.aspx page. What do I need to do to get this to work? ...

Get value from ASP.NET MVC Lambda Expression

Hi, I am trying to create my own HTML Helper which takes in an expression (similar to the built-in LabelFor<> helper. I have found examples to obtain the value of a property when the expression is similar to this: model => model.Forename However, in some of my models, I want to obtain properties in child elements, e.g. model => mode....

How to access AJAX hash values in ASP.NET MVC?

I'm considering using the hash method to create static urls to content that is managed by ajax calls in a Asp.Net MVC. The proof of concept i'm working on is a profile page /user/profile where one can browse and edit different sections. You could always ask for the following url /user/profile#password to access directly to you profile pa...

ASP.NET MVC Appends ' ?RouteValueDictionary ' to my routes

Hi, I'm doing some changes on my routes, and suddenly the following is appearing in my url's as a querystring: ?RouteValueDictionary=System.Web.Routing.RouteValueDictionary So, my url's now look like http://localhost:20367/Search/AdvancedSearchResults?RouteValueDictionary=System.Web.Routing.RouteValueDictionary How do I make it d...

Patching Asp.net Mvc2 AntiForgeryToken exception

Some background to my issue: It appears that there is a change/bug in Mvc2 concerning ValidateAntiForgeryTokenAttribute. When upgrading from Mvc1 to Mvc2, users with an active session will receive the following error when they request a page using ValidateAntiForgeryTokenAttribute: Unable to cast object of type 'System.Web.UI.Trip...

existing web app, want to add 'Areas', what are the ramifications of this?

I have an exising asp.net MVC app, and I want to add 'Areas' now. What are the ramifications of this? Any gotchas? ...

ASP.NET MVC Role Providers for MySQL

Hi, I tried to setup role provider, using this article. It worked partially - provider created some tables in MySQL, but I cannot access it from ASP.NET Configuration Tool. I get following error, while trying to add some roles (Roles->Create or Manage Roles): A network-related or instance-specific error occurred while establishing a c...

Problem submitting file content in Internet Explorer

Im submitting my file through jquery by using Jform.js plugin and its working in Firefox but when i try it on IE8 file properly sumbitted but file upload control gets hidden and further more when i comment IE condition then the file upload control doesnt get hide but when i check Request.Files[0].ContentLength in my controller it have 0 ...

storage for uploaded images on a web farm

I work on mvc.net application. Client is going to move production on a cluster environment. The problem is I store images in the local file system. Images can be dynamically uploaded by users through web site interface. How can I change the application in order to keep the images in working state? The possible solution is the using of s...