title: Ajax form submit in cshtml
body: <p>I'm using this form for ajax submission:</p>
  
  <pre><code>&lt;form class="status-form" role="form" action="" enctype="multipart/form-data" id="statusupdateform" method="post"&gt;
  </code></pre>
  
  <p>And this javascript to do the ajax functions:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var frm = $('#statusupdateform');
      frm.submit(function (ev) {
          $.ajax({
              type: frm.attr('method'),
              url: frm.attr('action'),
              data: frm.serialize(),
              success: function (data) {
                  alert('ok');
              }
          });
          ev.preventDefault();
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>But actually it refreshes the whole page.</p>
  
  <p>How can I do this?</p>