易截截图软件、单文件、免安装、纯绿色、仅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学习路线图

ASP.NET学习路线图
 
如果你已经有较多的面向对象开发经验,跳过以下这两步:
第一步 掌握一门.NET面向对象语言,C#或VB.NET 我强烈反对在没系统学过一门面向对象(OO)语言的前提下去学ASP.NET。 ASP.NET是一个全面向对象的技术,不懂OO,那绝对学不下去!
第二步 对.NET Framework类库有一定的了解 可以通过开发W ......

【转】ASP.NET中常用到的27个函数集

1、DateTime 数字型
以下是引用片段:
System.DateTime currentTime=new System.DateTime();
1.1 取当前年月日时分秒 currentTime=System.DateTime.Now;
1.2 取当前年 int 年=currentTime.Year;
1.3 取当前月 int 月=currentTime.Month;
1.4 取当前日 int 日=currentTime.Day;
1.5 取当前时 int 时=currentTi ......

asp.net连接sql用的SqlHelper

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Collections;
using System.Data.SqlClient;
namespace DAL
{
    /// <summary>
    /// 数据库的通用访问代码
    /// 此类为抽象类,不允许实例化,在应用 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号