2
Answers

Bind Default Value as YES in Radio Button in mvc 5

jothi kumar

jothi kumar

10y
1.3k
1
      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)