[ת]asp.netÇø·ÖÖÐÓ¢ÎÄ×Ö·û´®½ØÈ¡
/// <summary>
/// ×Ö·û´®Çиî
/// </summary>
/// <param name="p_SrcString"></param>
/// <param name="p_Length"></param>
/// <returns></returns>
public static string GetSubString(string p_SrcString, int p_Length)
{
string myResult = p_SrcString;
if (p_Length >= 0)
{
byte[] bsSrcString = System.Text.Encoding.GetEncoding("GB2312").GetBytes(p_SrcString);
if (bsSrcString.Length >= p_Length)
{
int nRealLength = p_Length;
int[] anResultFlag = new int[p_Length];
byte[] bsResult = null;
int nFlag = 0;
for (int i = 0; i < p_Length; i++)
{
if (bsSrcString[i] > 127)
{
nFlag++;
if (nFlag == 3)
nFlag = 1;
}
else
nFlag = 0;
anResultFlag[i] = nFlag;
}
if ((bsSrcString[p_Length - 1] > 127) && (anResultFlag[p_Length - 1] == 1))
nRealLength = p_Length + 1;
bsResult = new byte[nRealLength];
Array.Copy(bsSrcString, bsResult, nRealLength);
myResult = System.Text.Encoding.GetEncoding("GB2312").GetString(bsResult) + "...";
}
}
return myResult;
}
Ïà¹ØÎĵµ£º
1¡¢DateTime Êý×ÖÐÍ
System.DateTime currentTime=new System.DateTime();
¡¡¡¡1.1 È¡µ±Ç°ÄêÔÂÈÕʱ·ÖÃë
currentTime=System.DateTime.Now;
¡¡¡¡1.2 È¡µ±Ç°Äê
int Äê=currentTime.Year;
¡¡¡¡1.3 È¡µ±Ç°Ô &n ......
»º´æÊÇ°ÑÓ¦ÓóÌÐòÖеÄÐèҪƵ·±¡¢¿ìËÙ·ÃÎʵÄÊý¾Ý±£´æÔÚÄÚ´æÖеıà³Ì¼¼Êõ£¬Í¨³£ÓÃÀ´Ìá¸ßÍøÂçµÄÏìÓ¦Ëٶȡ£ÔÚASP.NETÖÐʹÓÃCacheÀàÀ´¹ÜÀí»º´æ¡£ÏÂÃæÏêÊö¿Ø¼þ¼¶Êý¾Ý»º´æ¹¦ÄܺÍÒ³Ã漶Êý¾Ý»º´æ¹¦ÄܵÄʵÏÖ£º
(1)Êý¾Ý¿â»º´æÒÀÀµ
Êý¾Ý¿â»º´æÒÀÀµÓÉSqlCacheDependencyÀà¹ÜÀí£»
Êý¾Ý¿â»º´æÒÀÀµµÄÓŵ㣺
1¡¢Ìá¸ßÊý¾Ý³ÊÏÖËٶȣ¬Ã¿´Î»ñ ......
½ñÌì¸ø¿Í»§×öÁ˸ö¹¦ÄÜÐèÒª°ÑÍø¸ñÊý¾Ý£¨Gridview£©µ¼³ö³ÉExecl£¬ËùÒÔÎÒÈ¥ÍøÉÏÕÒÁ˸ö´úÂë private void Export(string FileType, string FileName)
...{
try
...{
Response.Charset = "GB2312";
Response.ContentEncoding = System.Text.Encoding.UTF7;
Response.AppendHeader("Content-Disposition", "att ......
asp.net»ñÈ¡¿Í»§¶ËµÄMACµØÖ·¡²Ö»ÊÊÓÃÓÚ¾ÖÓòÍø¡³
[ת]http://www.cnblogs.com/scgw/archive/2008/08/01/1213951.html
½üÈÕÔÚ×öÒ»¸öͶƱϵͳÖÐÓÐÕâÑùÒ»¸öÐèÇó£ºÎªÁË·ÀÖ¹¶ñÒâÀƱ»òˢƱ£¬ÐèҪͨ¹ýÔ¶³Ì¿Í»§¶ËµÄIPµØÖ·
À´»ñÈ¡¿Í»§¶ËÍø¿¨µÄMACµØÖ·¡£ÍíÉÏÕÒÁ˺ܶà×ÊÁÏ£¬ÖÕÓÚÓеãÊÕ»ñ¡£
ÈçºÎÈ¡µÃÍø¿ ......