jothi kumar

jothi kumar

  • 1.5k
  • 104
  • 54.1k

Bind Default Value as YES in Radio Button in mvc 5

Jul 23 2014 3:17 AM
      hi to all,
                    Kindly help me How to set default value as "YES" in radio button in controller.
 
 
my code is:-
 
public ActionResult _CreatePartialView([Bind(Include = "Branch_Id,Branch_Name,Branch_Cde,IsActive)]Branch branch)
{
try
{
 branch.IsActive="Y";
 
db.Branches.Add(branch);
db.SaveChanges();
}
catch (exception)
{
-------- 
}
 
                    

Answers (2)