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

ASP.NET获取中文首字母

//ASP.NET获取中文首字母
    public class Converter
    {
        static public string GetChineseSpell(string strText)
        {
            int len = strText.Length;
            string myStr = "";
            for (int i = 0; i < len; i++)
            {
                myStr += getSpell(strText.Substring(i, 1));
            }
            return myStr;
        }
        static public string getSpell(string cnChar)
      {
          byte[] arrCN = Encoding.Default.GetBytes(cnChar);
          if (arrCN.Length > 1)
          {
              int area = (short)arrCN[0];
              int pos = (short)arrCN[1];
              int code = (area << 8) + pos;
              int[] areacode = { 45217, 45253, 45761, 46318, 46826, 47010, 47297, 47614, 48119, 48119, 49062, 49324, 49896, 50371, 50614, 50622, 50906, 51387, 51446, 52218, 52698, 52698, 52698, 52980, 53689, 54481 };
              for (int i = 0; i < 26; i++)
           &


相关文档:

asp.net wap 2.0 实现 ishtml32 下 加载 css文件

使用asp.net 开发wap 网站,在ishtml32下,如果手机浏览器支持ishtml32,但是 SupportsCss=False 时,想加载css文件时,采用重写mobile:form的方法来实现
using System;
using System.Configuration;
using System.Web.UI.MobileControls;
using System.Web.UI.MobileControls.Adapters;
public class MyForm : Form
{ ......

ASP.net连接Excel

首先添加命名空间
using System.Data.OleDb;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
strfile = Request.QueryString["filename"];//从其他页面传过来的文件路径
Excel(strfile);
}
}

private v ......

asp.net(c#)数据类型格式转换大全

1、DateTime   数字型 
       System.DateTime currentTime=new System.DateTime(); 
  1.1 取当前年月日时分秒 
       currentTime=System.DateTime.Now; 
  1.2 取当前年 
   &nb ......

asp.net中sessionstate不稳定的解决方案

ASP.NET提供了Session对象,从而允许程序员识别、存储和处理同一个浏览器对象对服务器上某个特定网络应用程序的若干次请求的上下文信息。Session对应浏览器与服务器的同一次对话,在浏览器第一请求网络应用程序的某个页面时,服务器会触发Session_onStart事件;在对话超时或者被关闭的时候会触发Session_onEnd 事件。程序员 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号