Pages

Friday, 18 January 2019

HTML inside if

HTML example for Radio button  inside of if-else using C# MVC

Code :



  @if(@Model.Status=="1")
  {
       @:<input type="radio" value="Active" checked name="rdostatus" />Active

       @:<input type="radio" value="InActive"  name="rdostatus" />In-Active
  }
  else
  {
       @:<input type="radio" value="Active"  name="rdostatus" />Active             @:<input type="radio" value="InActive" name="rdostatus" checked />In-Active
   
  }


No comments:

Post a Comment