title: How to pass values from view to controller using jquery function in asp.net mvc3
body: <p>I have to pass values from view to controller, controller having action method that will call webmethod to set values into database. how can i do that?</p>
  
  <ul>
  <li>need not to create a view of using model.</li>
  </ul>
  
  <p>I have a view that get the values from database and having one link that is comment. on click of comment one textarea box will open and after providing some input. will click on ok button.</p>
  
  <p>on click of button ok i am calling </p>
  
  <pre><code>    $('a.comment').livequery("click", function (e) {
      var getpID = $(this).parent().attr('id').replace('commentBox-', '');
      var comment_text = $("#commentMark-" + getpID).val();
      //alert(getpID);
      //alert(comment_text);
      if (comment_text != "Write a comment...") {
          //$.post("/Home/SetComment?comment_text=" + comment_text + "&amp;post_id-= " + getpID, {
  
      }, function (response) {
  
          $('#CommentPosted' + getpID).append($(response).fadeIn('slow'));
          //            $("#commentMark-" + getpID).val("Write a comment...");
          $("#commentMark-" + getpID).val();
      });
  }
  </code></pre>
  
  <p>now what can i do to get getpId and comment_text values to the controllers SetComment action?</p>