<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RouteAS.ascx.cs" Inherits="AVA.ResourcesPlatform.WebUI.Control.RouteAS" %> //在这个控件里面,加载 各个转发的的图片,最快的,默认为最快,发送设置用哪个转发发:RouteASGuid={选中的Guid}和RouteASClear=1,进行设置 < <% if (SettingGroup.RouteAS == true) { 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 %>
<% } %>