public string IESupport()
{
string IEType = getBrower();
ArrayList _list = new ArrayList();
string SupportedFlashError_message = "";
using (DBManage _db = new DBManage())
{
string strsql = "select SupportedFlashYesNo,SupportedFlashError_message from supported_flash where SupportedFlashID like '%" + IEType + "%'";
if (_db.SetData(strsql, ref _list))
{
if (_list.Count > 0)
{
string SupportedFlashYesNo = _list[0].ToString();
SupportedFlashError_message = _list[1].ToString();
if (SupportedFlashYesNo == "Yes")
{
}
else
{
//Response.Write("<script>alert('" + SupportedFlashError_message + "')</script>");
return SupportedFlashError_message;
}
}
}
}
return SupportedFlashError_message;
}
public static string getBrower()
{
HttpBrowserCapabilities bc = new HttpBrowserCapabilities();
bc = HttpContext.Current.Request.Browser;
return bc.Type;
}
然后在前台的Body部分的Onload事件中添加js函数:
function CheckMsg()
{
var a = "<%=IESupport()%>";
if(a=="")
{
}
else
{
alert(a);
}
}
浙公网安备 33010602011771号