web stats analysis

Archive for February, 2013

How do I disable Model validation for a single Action in a Controller ?

Disable the Required validation attribute in certain controller actions

Disable Required validation attribute under certain circumstances

Solution

public ActionResult Edit(int id)
{
         ModelState.Clear();
         return View();
}

 

Upload image files using ckeditor in Asp.Net / VB / C# / Jquery

File Upload in ckEditor ASP.NET

Ckeditor Image Upload

Ck editor in asp.net

Try Following link

 

pass model field value into a javascript variable

How to pass Model field value into a javascript variable?

How to use Model field value into a javascript variable?

Solution

var firstname = ‘<%: Model.Firstname %>’;

alert(firstname);

 

How to set the width of the text box when using HTml.TextBoxFor

Set the width of the text box when using HTml.TextBoxFor

Asp.net-mvc How to change width of Html.TextBox

Solution

<%: Html.TextBoxFor(m => m.FirstName, new { style = “width:200px;” })%>