Ajaxpro的同步调用疑问
类似一般调用方式
CS:
public class DBcase
{
public DBcase()
{
}
[AjaxPro.AjaxMethod]
public string tbind(string str1,string str2)
{
......
return ....
}
}
//在你调用该方法的页面后台先进行注册
protected void Page_Load(object sender, EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(DBcase));
}
JS:
<SCRIPT>
function get(obj1,obj2){
var s=DBcase.tbind(obj1,obj2);
alret(s)
}
</SCRIPT>
疑问:
如果通过构造函数传参的方式如何调用?
如下:
CS:
public class DBcase
{
private string s1;
private string s2;
public DBcase(string str1,string str2)
{
this.s1=str1;
this.s2=str2;
}
[AjaxPro.AjaxMethod]
public string tbind()
{
......
return s1+s2;
}
}
JS如何同步调用该方法,或者说不能这样做