title: How to put viewbag value as a variable in javascript/ jquery?
body: <p>I try to put two variable in JQuery which came from viewbags :</p>
  
  <pre><code>        $("#btnAdd").click(function () {
          var url = dev + "/Legacy/PutContentInThematic";
          var GroupingId = $("#GroupingId_Dialog").val();            
          var Title = $("#Title_Dialog").val();
          var Synopsis = $("#Description_Dialog").val();
          var image = $("#Image_Dialog").val();
          var ThematicId = @ViewBag.thematicid //Here i can't put ';'
          var ThematicName =  @ViewBag.Name
  
          $.ajax({
              url: url,
              cache: false,
              type: 'POST',
              data: {
                  GroupingId: GroupingId,
                  ThematicId: ThematicId,
                  Title: Title,
                  Synopsis: Synopsis,
                  Image: image,
                  ThematicName: ThematicName
              }
          });
      });
  </code></pre>
  
  <p>The problem concerns the two last variables "ThematicId" And "ThematicName", it is impossible to put ';' at the end, so the second variable ThematicName don't work.</p>
  
  <p>I try to put this variable out of the function, but i doesn't work anymore. Have you and idea to fix it or an other solution for this Ajax call ?</p>