title: cannot implicitly convert type 'void' to 'object' asp.net.MVC
body: <p>I am completely new In .NET.and i am just trying to achieve data annotation validation on client side.For that i search on net and found some solution.
  about client side validation.</p>
  
  <p><a href="https://www.codeproject.com/Articles/556995/ASP-NET-MVC-interview-questions-with-answers" rel="nofollow noreferrer">https://www.codeproject.com/Articles/556995/ASP-NET-MVC-interview-questions-with-answers</a></p>
  
  <p>i just follow those steps.my code =>(include js files in bundle(WEB.OPTIMIZATION)) code below---</p>
  
  <pre><code>.Include("~/Content/js/plugins/jquery/jquery-2.2.4.js")
  .Include("~/Scripts/jquery.validate.js")
  .Include("~/Scripts/jquery.validate.unobtrusive.js")
  </code></pre>
  
  <p>and my view --</p>
  
  <pre><code>        @using something
          @model Vendor
          @{
              ViewBag.Title = "Add Vendor";
              ViewBag.Description = "TSMS-admin";
          }
  
          @section PageDescription{
              &lt;section class="content-header"&gt;
                  &lt;h1&gt;
                      @ViewBag.Title
                      &lt;small&gt;@ViewBag.Description&lt;/small&gt;
                  &lt;/h1&gt;
              &lt;/section&gt;
          }
  
          @section Scripts{
              @if (ViewBag.Message != null)
              {
                  &lt;script type="text/javascript"&gt;
                      $(function () {
                          CustomMessage('Error', '@ViewBag.Message', 'Close');
                      });
                  &lt;/script&gt;
              }
          }
  
  
          &lt;div class="row .col"&gt;
              &lt;div style="margin-top:20px" class="mainbox col-md-12 col-md-offset-0 col-sm-8 col-sm-offset-2"&gt;
                  @using (Html.BeginForm("Add", "Admin", FormMethod.Post, new { @class = "form-horizontal", @id = "AddVendorForm", @enctype = "multipart/form-data" }))
                  {
                      @Html.AntiForgeryToken()
                      @Html.EnableClientValidation()
                      @Html.ValidationSummary(true, null, new { @class = "text-danger" })
                      @Html.HiddenFor(model =&gt; model.adding_date, new { @Value = System.DateTime.Now })
  
                      &lt;div class="panel panel-info"&gt;
                          &lt;div class="panel-heading"&gt;
                              &lt;div class="panel-title"&gt;Add A New Vendor&lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="panel-body col-md-12"&gt;
                              &lt;div&gt;
                                  &lt;img class="center-block" style="border-radius: 3px;height: 200px;width: 200px;" id="venpic" src="~/Content/img/tsms/default/upload.png"&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;
                                  &lt;label style="border-radius: 2px;" class="col-xs-12 btn btn-primary btn-load btn-lg" data-loading-text="Uploadinging Picture..."&gt;
                                      &lt;input autocomplete="off" required name="pic_path" id="ifile_img" accept="image/gif,image/jpeg,image/jpg" onchange="readURL(this,'#venpic')" type="file" style="display: none;"&gt;Choose Pic
                                  &lt;/label&gt;
                                  @Html.ValidationMessageFor(model =&gt; model.pic_path, null, new { @class = "text-danger" })
                              &lt;/div&gt;
                              &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
                              &lt;div&gt;
                                  @Html.TextBoxFor(model =&gt; model.heading, new { @style = "border-radius:3px;", @class = "form-control", @id = "VendorName", @placeholder = Html.DisplayNameFor(model =&gt; model.heading), @autocomplete = "on", @onkeyup = "uppercase(this)" })
                                  @Html.ValidationMessageFor(model =&gt; model.heading, null, new { @class = "text-danger" })
                              &lt;/div&gt;
                              &lt;br /&gt;
                              &lt;div&gt;
                                  @Html.TextAreaFor(mode =&gt; mode.body, new { @style = "border-radius:3px;", @class = "form-control", @id = "VendorDetails", @placeholder = Html.DisplayNameFor(model =&gt; model.body), @autocomplete = "on" })
                                  @Html.ValidationMessageFor(model =&gt; model.body, null, new { @class = "text-danger" })
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="panel-footer"&gt;
                              &lt;div class="panel-title"&gt;
                                  &lt;div class="form-actions no-color"&gt;
                                      &lt;input onclick="d()" type="button" id="AddVendor" value="Add" class="btn btn-success" /&gt; | @Html.ActionLink("Back to List", "Manage")
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  }
              &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>problem is when i just wants to add <code>@Html.EnableClientValidation()</code> it showing me some kind of error like below...</p>
  
  <p><a href="https://i.stack.imgur.com/SV2RU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SV2RU.png" alt="Problem"></a>
  how can i solve my problem.also the steps i am following to achieve data annotation validation on client side i it right/or i need to something else to achive this ---like <code>@Html.EnableUnobtrusiveJavaScript()</code>
  is it necessary to acieve this...
  .net MVC expert please help me......</p>