Top "Asp.net-mvc-2" questions

ASP.

Showing Difference between two datetime values in hours

I am retrieving two date time values from the database. Once the value is retrieved, I need the difference between …

c# asp.net-mvc-2 datetime timespan
Making a Simple Ajax call to controller in asp.net mvc

I'm trying to get started with ASP.NET MVC Ajax calls. Controller: public class AjaxTestController : Controller { // // GET: /AjaxTest/ public ActionResult …

c# jquery asp.net asp.net-mvc asp.net-mvc-2
Download file of any type in Asp.Net MVC using FileResult?

I've had it suggested to me that I should use FileResult to allow users to download files from my Asp.…

c# asp.net-mvc-2
Url.Action parameters?

In listing controller I have, public ActionResult GetByList(string name, string contact) { var NameCollection = Service.GetByName(name); var ContactCollection = Service.…

asp.net html asp.net-mvc-2 url.action
How to write a simple Html.DropDownListFor()?

In ASP.NET MVC 2, I'd like to write a very simple dropdown list which gives static options. For example I'd …

c# asp.net asp.net-mvc-2 html.dropdownlistfor
How to set a default value with Html.TextBoxFor?

Simple question, if you use the Html Helper from ASP.NET MVC Framework 1 it is easy to set a default …

c# asp.net-mvc-2 html-helper
Percentage calculation

I am working in progress bar concept in ASP.NET MVC 2. Here i have a DropDownList which has 10 values. i …

c# asp.net asp.net-mvc-2 drop-down-menu
EditorFor() and html properties

Asp.Net MVC 2.0 preview builds provide helpers like Html.EditorFor(c => c.propertyname) If the property name is string, …

c# asp.net-mvc asp.net-mvc-2
A default document is not configured for the requested URL, and directory browsing is not enabled on the server

I have just deployed my asp.net mvc-2 website to a server (using dotnetpanel). But getting this error A default …

asp.net-mvc-2 web-hosting
ModelState.AddModelError - How can I add an error that isn't for a property?

I am checking my database in Create(FooViewModel fvm){...} to see if the fvm.prop1 and fvm.prop2 already exist …

asp.net-mvc-2 asp.net-mvc-2-validation modelstate