<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ASRoute.aspx.cs" Inherits="AVA.ResourcesPlatform.WebUI.Tools.AS.ASRoute" %> <%= Import.ScriptTheme("js/jquery.1.9.js")%> <% if (SettingGroup.RouteAS == true && CookieGroup.RouteAS == null) { var html = ""; IList list = null; if (System.Web.HttpRuntime.Cache["MyAgentServerTestListAgentServer"] != null) { list = System.Web.HttpRuntime.Cache["MyAgentServerTestListAgentServer"] as IList; } else { list = CreateInstance.AgentServerDao.GetAll(); System.Web.HttpRuntime.Cache.Insert("MyAgentServerTestListAgentServer", list, null, DateTime.Now.AddSeconds(3600), TimeSpan.Zero); } var random = new Random().Next(1, 10000); foreach (var item in list) { var web = item.IPAddress; if (web[web.Length - 1] == '/') { web = web.Substring(0, web.Length - 1); } var imageUrl = web + "/Images/Download.jpg"; var image = new HtmlImg(imageUrl + "?time=" + random) { OnLoad = "MyAgentServerTestComplete('" + item.Guid + "')" }; html += image.ToString(); } %> <%= html %> <% } %>