Top "Asp.net-mvc-3" questions

ASP.

How to set value in @Html.TextBoxFor in Razor syntax?

I have created an text-box using Razor and trying to set value as follows. @Html.TextBoxFor(model => model.Destination, …

.net asp.net-mvc asp.net-mvc-3 razor html.textboxfor
Where and how is the _ViewStart.cshtml layout file linked?

Here's the About.cshtml from the default MVC 3 template: @{ ViewBag.Title = "About Us"; } <h2>About</h2> &…

.net asp.net-mvc asp.net-mvc-3 razor
Redirect From Action Filter Attribute

What is the best way to do a redirect in an ActionFilterAttribute. I have an ActionFilterAttribute called IsAuthenticatedAttributeFilter and that …

c# asp.net-mvc asp.net-mvc-3 redirect routes
Handling onchange event in HTML.DropDownList Razor MVC

I'm handling an onchange event with a selected value by simple HTML like this: <select onchange="location = this.value;"&…

asp.net-mvc asp.net-mvc-3 razor html-helper
Default value in an asp.net mvc view model

I have this model: public class SearchModel { [DefaultValue(true)] public bool IsMale { get; set; } [DefaultValue(true)] public bool IsFemale { get; …

asp.net-mvc asp.net-mvc-3
How to change the display name for LabelFor in razor in mvc3?

In razor engine I have used LabelFor helper method to display the name But the display name is seems to …

asp.net-mvc-3 html-helper
ASP.NET MVC3 - textarea with @Html.EditorFor

I have ASP.NET MVC3 app and I have also form for add news. When VS2010 created default view I …

asp.net-mvc-3
HTML.HiddenFor value set

@Html.HiddenFor(model => model.title, new { id= "natureOfVisitField", @value = '@Model.title'}) it doesen't work! how to set the …

asp.net-mvc asp.net-mvc-3 html-helper html.hiddenfor
Render partial view with dynamic model in Razor view engine and ASP.NET MVC 3

When I try to render a partial view whose model type is specified as: @model dynamic by using the following …

asp.net-mvc razor asp.net-mvc-3
MaxLength Attribute not generating client-side validation attributes

I have a curious problem with ASP.NET MVC3 client-side validation. I have the following class: public class Instrument : BaseObject { …

c# asp.net-mvc validation asp.net-mvc-3 model-validation