попробуйте что-то вроде этого
$(".thread_container input[type='button'][name='simplecomment_submit']").live("click", function(e) {
var url = "/script/ajax/myhandler.ashx";
$.post(url,
{$('form').serialize(),action:'comment_save'},
function(data) {
if (data == "True") {
// update comment list
} else {
// report error
}
}); <-- you missed a semicolon
});
и часть обработчика
Public Class commenthandler : Implements IHttpHandler, IReadOnlySessionState
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
Dim action As String = context.Request.QueryString("action")
Dim result As String = Boolean.FalseString
Select Case action
Case "comment_save"
Dim comment As String = Context.Request.Form.Get("comment_message")
' call save comment here
End Select
Return result
End Sub
End Class
РЕДАКТИРОВАТЬ
$(".thread_container input[type='button'][name='simplecomment_submit']").live("click", function(e) {
var url = "/script/ajax/myhandler.ashx";
var commentText = $("#simplecomment_commenttext").html(); //get the comment text
$.post(url,
{commentTxt:commentText,action:'comment_save'},
function(data) {
if (data == "True") {
// update comment list
} else {
// report error
}
});
});
и в обработчике сделайте
Dim action As String = context.Request.QueryString("commentTxt")