6月16日学习小结

1、学习了导入excel到gridview

2、学习了判断文件名及后缀名

string aFirstName = pPath.Substring(pPath.LastIndexOf("\\") + 1, (pPath.LastIndexOf(".") - pPath.LastIndexOf("\\") - 1));  //文件名
             string aLastName = pPath.Substring(pPath.LastIndexOf(".") + 1, (pPath.Length - pPath.LastIndexOf(".") - 1));   //扩展名

3、学习了建立一个通用的弹出信息类

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;

//using System.Web.UI;

namespace test1
{
    public class info
    {
       
        public static void Alert(string text, Page p)
        {
            string script = "<script>alert('" + text + "')</script>";
            p.ClientScript.RegisterStartupScript(p.GetType(), "", script);
        }
    }
   
}

posted @ 2012-06-16 02:46  老沙  阅读(130)  评论(0)    收藏  举报