title: jquery asp.net mvc submit form doesn't work
body: <p>why this code doesn't work?why i can't get alert message..? where is the problem? </p>
  
  <pre><code>  $('.msg_txt).keypress(function (e) {
                      if (e.which == 13) {
  
                          $("#sendform").submit(function () {
                                                  $.post($(this).attr("action"),
                                      $(this).serialize(),
                                      function (data) {
                                          alert("ok, this work");
                                      });
                              e.preventDefault();
  
                          });
  
                      }
                  });
  </code></pre>
  
  <p>my cshtml file..</p>
  
  <pre><code>@using (Html.BeginForm("Send", "Mycontroller", FormMethod.Post, new { id = "sendform" }))
                {
          &lt;textarea id="TextArea1" class="msg_txt" name="poruka" cols="20" rows="2"&gt;&lt;/textarea&gt;
                    &lt;input id="Submit1" type="submit" value="Send"  /&gt;         
                } 
  </code></pre>