script不刷新页面的联动前后代码

复制代码 代码如下:


<%-- 大小类--%>


//后台代码
AjaxPro.Utility.RegisterTypeForAjax(typeof(bargain_class)); //本页页面名

//===============================ajax调用=====================================
[AjaxPro.AjaxMethod]
public string link(string name)
{
string text = "";
string sql = "select name from Management_products_class where pid='" + name + "'";
DataTable dt = LinkSql.conn(sql);

for (int i = 0; i < dt.Rows.Count; i++)
{
if (text == "")
{
text = dt.Rows[i]["name"].ToString();
}
else
{
text += "," + dt.Rows[i]["name"].ToString();
}
}
return text;
}

你可能感兴趣的:(script不刷新页面的联动前后代码)