您目前尚未登陆,请选择【登陆】或【注册
首页->聊天计数->Asp.net简单防刷新图片计数器源码>>count.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:Asp.net简单防刷新图片计数器源码
当前文件:文件类型 ImgCounts/count.aspx.cs打开代码结构图
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Web; 5using System.Web.Security; 6using System.Web.UI; 7using System.Web.UI.WebControls; 8using System.Web.UI.WebControls.WebParts; 9using System.Web.UI.HtmlControls; 10 11public partial class _Default : System.Web.UI.Page 12{ 13 protected void Page_Load(object sender, EventArgs e) 14 { 15 //该源码下载与http://www.51aspx.com 16 17 //记数器 18 int c = (int)Application["count"]; 19 int dc = (int)Application["day_count"]; 20 string count = c.ToString();//转换为字符串 21 string day_count = dc.ToString(); 22 //根据字符串每位的值调用图片 23 for (int i = 0; i < count.Length;++i ) 24 { 25 int n = count.Length; 26 Image img=new Image(); 27 28 img.ImageUrl="~\\count\\"+count[i]+".gif"; 29 ph1.Controls.Add(img); 30 } 31 for (int i = 0; i < day_count.Length;++i ) 32 { 33 int n = day_count.Length; 34 Image img = new Image(); 35 img.ImageUrl="~\\count\\"+day_count[i]+".gif"; 36 ph2.Controls.Add(img); 37 } 38 } 39} 40
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:Asp.net简单防刷新图片计数器源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号