using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace Mtxfw.shop { public partial class xzapp : System.Web.UI.Page { public string strweixin = ""; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string str_u = Request.ServerVariables["HTTP_USER_AGENT"].ToLower(); //Response.Write(str_u); if (str_u.IndexOf("micromessenger") != -1) { //微信访问 strweixin = "
"; } else { if (str_u.IndexOf("android") != -1) { Response.Redirect("/weixin/QianBao_Android_build201505071913.apk"); } else if (str_u.IndexOf("iphone") != -1 || str_u.IndexOf("ipad") != -1) { Response.Redirect("/weixin/QianBao_iPhone_build201505081007.ipa"); } else if (str_u.IndexOf("windowsphone8") != -1) { Response.Redirect("/weixin/QianBao_WindowsPhone8_build201505071928.xap"); } else if (str_u.IndexOf("windows8") != -1) { Response.Redirect("/weixin/QianBao_Windows8_build201505071939.zip"); } } } } } }