Unfortunately, .so far as I know, .NET doesn't let you post to a user
control.
For what it's worth, the .NET projects I've done with jQuery used a separate
ashx page to handle all ajax requests.
I created an IHttpHandler, mapped it in the web.config file, and in that
handler applied the various security restrictions, processed the requests
and returned the results in JSON formatting.
Not to say this is the best way to deal with it, it's just the one that I
chose, and I found it very easy to develop for .NET that way.
JK
----- Original Message -----
From: "AndyP" <[EMAIL PROTECTED]>
To: "jQuery (English)" <jquery-en@googlegroups.com>
Sent: Thursday, October 04, 2007 10:31 AM
Subject: [jQuery] JQuery AJAX with .NET - Limitations
I noticed the following problem in using jquery AJAX with .NET:
NOTE: I don't have the below problems if I use AjaxPro, just wanted to
do
the same with JQuery. Is this is possible, or should I just stick with
AjaxPro.
1) Cannot return a Datatable to the callback function
[AjaxPro.AjaxMethod()]
public System.Data.DataTable GetTestCaseById(int Id)
{
objTestCase.TestCaseCode = Id;
return
objTestCase.GetTestCaseById(objTestCase).Tables[0];
}
var ResDataTable=Bubya.TestCase.GetTestCaseById(Id).value;
if(ResDataTable!=null){
$('#testcase').value=ResDataTable.Rows[0]
["testcase_summary"];
}
2) Cannot post to a user control
$(document).ready(function() {
$.post( "wucPeopleList.ascx",
{ call_type: 'UpdateAccessRights',
user_code: UserCode
},
function(response){
}
);
}
);