title: How To Use ViewBag Data In jQuery
body: <p>Here I have ViewBag in a controller which contains text i.e <code>ViewBag.Msg = "No Sprint"</code>.<br>
  And I am trying to use ViewBag.Msg in Jquery to display modal.<br>
  Now, the problem is that the script is script never gets executed.<br><br>
  Below is my jQuery.<br></p>
  
  <pre><code> &lt;script&gt;
      $(document).ready(function () {
          debugger;
          if (@ViewBag.Msg != null)
          {
              $("#myModal").modal();
          }
      });
  &lt;/script&gt;
  </code></pre>
  
  <p><br>
  Any help will be highly appreciated. Thank You.</p>