易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net生成数字、字母随机数

 char[] constant = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };
                StringBuilder ascii = new StringBuilder();
               // byte[] bytes = new byte[100];
                Random random = new Random();
               
              //  int code;
               // string strRnd = "游客" + random.Next(9).ToString() + random.Next(9).ToString() + random.Next(9).ToString();
                for (int i = 0; i < 4; i++)
                {
                   // code = random.Next(62);
                   ascii.Append(constant[random.Next(62)]);
                }
               // ASCIIEncoding ascii = new ASCIIEncoding();
                lbl.Text = ascii.ToString();


相关文档:

asp.net mvc浏览器缓存和压缩的实现

cache在开发高可扩展性的web应用中起着至关重要的作用,我们可以按照预定的时间将任何get请求缓存到浏览器中,如果在预定的时间内用户请求同一URL那么response就会通过浏览器的cache来实现而非server。可以通过下面的action filter在ASP.NET MVC应用中实现同样的功能:
using System;
using System.Web;
using System.We ......

ASP.NET刷新页面

      第一:
private void Button1_Click( object sender, System.EventArgs e )   
{
     Response.Redirect( Request.Url.ToString( ) );
}
 
第二:
private void Button2_Click( object sender, System.EventArgs e )   
{ ......

ASP.NET Cookie使用()

1.什么是cookie?
cookie 是一小段文本信息,伴随用户请求,在web服务器和浏览器之间传递。用户每次访问站点的时候,
web应用程序都可以读取cookie包含的信息。
假设在用户请求您的网站的某个页面时,您的应用程序不仅是返回请求的页面。同时也返回一个包含日期
和时间的cookie。用户的浏览器在获得页面的同时也获得了 ......

ASP.NET Web Developer Checklist




The following is a simple checklist you can use when building web
applications.  Much of this still applies to other technologies and can
easily be extended.  I try not to get too specific on technology or
methodology, but it is definitely leaning toward ASP.NET.
If you
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号