易截截图软件、单文件、免安装、纯绿色、仅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刷新页面

      第一:
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中常用到的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页面运行机制以及请求处理流程

IIS自身是不能处理像ASPX扩展名这样的页面,只能直接请求像HTML这样的静态文件,之所以能处理ASPX这样扩展名的页面,是因为IIS有一个ISAPI过滤器,它是一个COM组件。ASP.NET服务在注册到IIS的时候,就会添加一个Win32的扩展动态库aspnet_isapi.dll。并将扩展可以处理的页面扩展名(如ASPX)注册到IIS里面。扩展启动后,就根 ......

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号