title: How to hide one field when the user enter data in another field .NET MVC 4 Razor
body: <p>I had one field something like Holiday such that is given below,</p>
  
  <pre><code> [StringLength(50)]
   [DisplayName(Constants.DisplayName.HolidayDay)]
   public virtual string HolidayDay { get; set; }
  </code></pre>
  
  <p>And</p>
  
  <pre><code> public virtual enumHolidayDay enumHolidayDay
   {
        get
        {
              return (enumHolidayDay)Enum.Parse(typeof(enumHolidayDay), HolidayDay);
        }
        set
        {
              HolidayDay = value.ToString();
        }
   }
  </code></pre>
  
  <p>And </p>
  
  <pre><code>public enum enumHolidayDay
  {
      [Description("Saturday")]
      saturday = 1,
  
      [Description("Sunday")]
      sunday = 2,
  }
  </code></pre>
  
  <p>And my Holiday.cshtml file is following</p>
  
  <pre><code>       &lt;div class="row"&gt;
              &lt;div class="col-md-3"&gt;
                  &lt;label for="" class="control-label"&gt;
                  Set Holiday For &lt;/label&gt;&lt;br /&gt;
                       @Html.EnumCheckBoxFor(m =&gt; m.enumHolidayDay)
              &lt;/div&gt;
          &lt;/div&gt;
         &lt;br/&gt;
  
          &lt;div class="row"&gt;
              &lt;div class="col-md-3"&gt;
                  &lt;label for="" class="control-label"&gt;
                      Day&lt;/label&gt;&lt;br /&gt;
                  @Html.TextBoxFor(model =&gt; model.HolidayDay, new { @class = "form-control"  
                                                }).DisableIf(() =&gt; Model.IsReadOnly == true)
              &lt;/div&gt;
          &lt;/div&gt; 
  </code></pre>
  
  <p>On my screen there are two checkboxes named Saturday and another one is Sunday. And one textbox named Day, But user can enter data in either one of it. One is mandatory. How to handle them, i.e. How to disable the Day field when the user click the any checkbox. And the Holiday field only used to these controls. In which event i have to handle it without using scripts and what are the code i need to add for this. Can anyone please help to find the solution...</p>