Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string url = "http://ip.chinaz.com/getip.aspx";

            byte[] r = new WebClient().DownloadData(url);
            TextBox2.Text = Encoding.UTF8.GetString(r);
            if (!IsPostBack)
            {
                Double HexVer = UpdateDataDBOption.GetSoftVer();
                Label1.Text = HexVer.ToString("0.00");
            }
        }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         double v1, v2;
         v1 = UpdateDataDBOption.GetSoftVer();
         v2 = UpdateDataDBOption.GetHexVer();
         Response.Write(((int)ErrType.retOK).ToString() + "," + v1.ToString("f2") + "|" + v2.ToString("f2"));
     }
     catch (System.Exception ex)
     {
         Response.Write("-100," + ex.Message);
         TextLog.AddTextLog("GetVer_Unkown:" + ex.Message, Global.txtLogFolder + "Update.txt", true);
     }
 }