asp.net-mvc

asp.net mvc 2 web application inside a Web site?

I have a Asp.Net Web Site deployed as a WebSite inside IIS 7.5. http://localhost/WebSite Then I have a second Asp.Net MVC 2 web application which is deployed as Sub Application inside the above WebSite. So the mvc aplication should work on the following Url. http://localhost/WebSite/MvcApp/ The web site works fine but when ...

Minifying Javascript on Visual Studio 2010 on release mode

I have a ASP.NET MVC 2 project on Visual Studio 2010. I want to be able to use my plain javascript files in debug mode so I can understand what's going on when debugging, but I want to used a minified/compressed version when using release mode. I was planning to create some extenders to include the js files in each page, something like:...

Design Decision - Scaling out web based application's architecture

This question is about design decision. I am currently working on a web project that will have 40K users to start with and in couple of month expected to grow 50M users (not concurrent users though). I would like to have a architecture that can be scaled out easily without much effort. In order to explain, I would like to use a trivial ...

How to let browsers know files have been updated? ASP.NET MVC

I have a ASP.NET MVC website hosted in IIS. Sometimes I push changes and user's browser may still using the previous files, causing functionality problems. It is because the browser is caching those files right? What can I do to ensure the user browser loading the updated files?? Thanks! ...

How to disable autocomplete in MVC Html Helper

I have a typical ADO.NET EF-driven form that allows the user to input a date. I have put a jQuery datepicker on it but when the user goes to select a date the browser shows some other entries in a dropdown. How do I turn off that dropdown? In traditional ASP.NET I would put autocomplete="off". Not sure of the MVC equivalent. <div class...

Silverlight or MVC for Web Development

I was just wondering about the opinions out there. What do you think promotes faster development times for a web application? Silverlight or .Net MVC? And could Silverlight be a replacement for a true http web application? Feel free to rant or give as much details as necessary. ...

MVC null model problem

hello, i have created two create actions..one to call the create view and the other to process the create view using httppost. when i call the create view, it gets published correctly , dropdowns and all. the problem is that when i fill out the create form and click on the submit button, i get an error; Object reference not set to an ...

How to calculate page visit times for a website

I am building some custom logging code to track how people use our web application. I am doing this is in the Site.master page under ASP.NET MVC, but my question is actually more generic. What I would like to do is determine how long someone spends on a particular page. I can track when people hit a certain page, but obviously I can't...

'ErrorMessageResourceType' property specified was not found. on XmlSerialise

In my ASP.Net MVC app I have a Model layer which uses localised validation annotations on business objects. The code looks like this: [XmlRoot("Item")] public class ItemBo : BusinessObjectBase { [Required(ErrorMessageResourceName = "RequiredField", ErrorMessageResourceType = typeof(StringResource))] [HelpPrompt("ItemNumber")] ...

Retaining parameters in ASP.NET MVC

Many MVC frameworks (e.g. PHP's Zend Framework) have a way of providing basic state management through URLs. The basic principle is this: Any parameters that were not explicitly modified or un-set get copied into every URL For instance, consider a listing with pagination. You'll have the order, direction and page number passed as URL p...

Silverlight 4 - MVC 2 ASP.NET Membership integration "single sign on"

Scenario: I have an ASP.NET MVC 2 site using ASP.NET Forms Authentication. The site includes a Silverlight 4 application that needs to securely call internal web services. The web services also need to be publically exposed for third party authenticated access. Challenges: Securely accessing webservices from Silverlight using ...

Using ViewModel in ASP.NET MVC with FluentValidation

I am using ASP.NET MVC with Entity Framework POCO classes and the FluentValidation framework. It is working well, and the validation is happening as it should (as if I were using DataAnnotations). I have even gotten client-side validation working. And I'm pretty pleased with it. Since this is a test application I am writing just to s...

Can I bind multiple forms to a single model using the default model binder?

I have a complex page with several forms on it. The page is divided into sections, and each section has a continue button on it. The page is bound to a pageViewModel, each section addresses a different set of properties on the model. The continue button makes an ajax call to the controller, and the model binder binds it appropriatel...

ASP.NET MVC Binding - Duplicated Messages

I'm using ASP.NET MVC Binding Framework. Let's say I have a class Item, that has a mandatory field Id. I am binding a List, and do not want one error message for each element in this list. If more then one error happen when binding the Id field, I want only one message to be added to ModelState and shown to the user. In one sentenc...

JQuery datepicker not working

I'm completely new to JQuery and MVC. I'm working on a pet project that uses both to learn them and I've hit my first snag. I have a date field and I want to add the JQuery datepicker to the UI. Here is what I have done: Added <script src="../../Scripts/jquery-1.3.2.min.js" type="text/javascript"></script> to the site.master In...

DateTime from Javascript post to Controller in ASP.NET results in null (01/01/0001)

This is driving me crazy, similar to this. If I use a standard form and no javascript the controller correctly binds the datetime. However when I'm posting from a form it always binds as null: "MyObject.Name": "Test name", "MyObject.Date": "5/1/2001" I've tried a couple of variations, 5-1-2001, etc. but cannot seem to get it to take....

How to outsource pieces of a web project

I would like to outsource pieces of a new web application/site. I don't want one company working on the whole project because they can easily change a few things and sell the software to someone else. I will be using a freelenace website like elance or guru. A buddy of mine has given me this advice but he did not say how this can be done...

Combine and minimize css with title and rel attributes

I have been reading about css and js compression and minimizing. In particular that post http://stackoverflow.com/questions/890561/concatenate-minify-js-on-the-fly-or-at-build-time-asp-net-mvc Im developing a MVC ASP.NET application and using Combres for minimizing and compress files. I'm not too happy and now i'm evaluating MVCScriptMan...

What are some things I should watch out for before hiring a freelance programmer

I am looking to hire a freelancer for a big web application. The budget for this project is a little over $20,000. The programmer will develop in asp.net MVC C#. Are there any usual things I should pay attention to or watch out for. i really don't want to hire the freelancer and when he/she is done with the project it is not what i expec...

Newbie question about controllers in ASP.Net MVC.

I'm following a tutorial on creating the NerdDinner using ASP.Net MVC. However, I'm using Visual Studio 2010 Ultimate edition and there was only MVC2 to choose from. So I've following the tutorial so far, and everything is really clicking and being really well explained, until this little hitch. The guide is asking me to create new met...