jothi kumar

jothi kumar

  • 1.3k
  • 107
  • 56.3k

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)