/// 显示Loading状态提示==wcd/2016-06-27 11:02
/// </summary>
public void LoadingDiv()
{
System.Web.HttpContext.Current.Response.Write("<div id='loadingDiv'><br/><table border=1 width=250 cellpadding=5 style='border-collapse: collapse' bordercolor='#3399FF' bgcolor='#f5f5ff' align='center'>");
System.Web.HttpContext.Current.Response.Write("<tr><td align='center'><img src='../img/loading.gif' border='0' alt=''/> 数据处理中......</td></tr>");
System.Web.HttpContext.Current.Response.Write("</table><br/></div>");
}
/// <summary>
/// 关闭Loading状态提示==wcd/2016-06-27 11:02
/// </summary>
public void LoadingDivClose()
{
System.Web.HttpContext.Current.Response.Write("<script language=\"JavaScript\">");
System.Web.HttpContext.Current.Response.Write("if (document.getElementById('loadingDiv')){ document.getElementById('loadingDiv').style.display = \"none\";}");
System.Web.HttpContext.Current.Response.Write("</script>");
}
=======================================================================================================
/// <summary>
/// 得到客户端的IP
/// </summary>
/// <returns></returns>
public static string GetClientIP()
{
string userIP = null;
HttpRequest Request = HttpContext.Current.Request;
if (Request.ServerVariables["HTTP_X_FORWARDED_FOR"] != "")
userIP = Request.ServerVariables["REMOTE_ADDR"];
else
userIP = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (userIP == null || userIP == "")
userIP = Request.UserHostAddress;
return userIP;
}