Hi, Michael , I want to use the ajaxmethod to show a table in HTML
file, but when client-side callback it has a error, please see below
code(.NET1.1+V:6.6.7.1):
[AjaxPro.AjaxMethod]
public string AjaxData()
{
string sSql="select User, ID from msi where eformsn=13350";
DataGrid1.DataSource=DB("query",sSql);
DataGrid1.DataBind();
System.Text.StringBuilder sb=new System.Text.StringBuilder();
System.IO.StringWriter sw=new System.IO.StringWriter(sb);
System.Web.UI.HtmlTextWriter htw=new HtmlTextWriter(sw);
DataGrid1.RenderControl(htw);
return sb.ToString();
}
....
var obj=document.all;
function AjaxData()
{
eol.val.AjaxData(AjaxData_Callback);
}
function AjaxData_Callback(res)
{
obj.box.innerHTML=res.request;
}
<div id="box">DataGrid control ajax demo.</div>
Michael or anyone can help me to fix this problem. thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---