自定义控件在AJAX的UpdatePanel中使用时 添加javascript脚本方法
ScriptManager.RegisterClientScriptBlock(this.TemplateControl, this.GetType(), "KKK", "alert('成功');", true);
if
(Request.Cookies[
"
NewShopCK
"
]
!=
null
)
{
string userName = Request.Cookies["NewShopCK"].Values["shopuser"].ToString();
if (Session["DDVds"] != null)
{
foreach (DataRow DR in ((DataSet)Session["DDVds"]).Tables["CGs"].Rows)
{
if (DR["ULName"].ToString() == userName)
{
ScriptManager.RegisterClientScriptBlock(this.TemplateControl, this.GetType(), "KKK", "alert('您的购物车中有自己的商品');", true);
}
}
}
}
{
string userName = Request.Cookies["NewShopCK"].Values["shopuser"].ToString();
if (Session["DDVds"] != null)
{
foreach (DataRow DR in ((DataSet)Session["DDVds"]).Tables["CGs"].Rows)
{
if (DR["ULName"].ToString() == userName)
{
ScriptManager.RegisterClientScriptBlock(this.TemplateControl, this.GetType(), "KKK", "alert('您的购物车中有自己的商品');", true);
}
}
}
}