• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
萌子
记录程序路上的点点滴滴……
博客园    首页    新随笔    联系   管理    订阅  订阅

随笔分类 -  c#.net

加载页面时检测是否登陆

摘要:if (!IsPostBack) { CommFun.IsAdmin(); } commfun.cs中 public static void IsAdmin() { //查看是否为超级管理员 if (HttpContext.Cu... 阅读全文
posted @ 2009-04-02 16:33 萌子 阅读(205) 评论(0) 推荐(0)
DropDownList绑定 调用类

摘要:string strqry = ""; strqry = "select * From bigclassname "; DBFun.FillDwList(DropDownList1, "Select * from bigclassname"); DropDownList1.Items.Add(new... 阅读全文
posted @ 2009-04-02 16:30 萌子 阅读(367) 评论(0) 推荐(0)
VS2005 Gridview操作

摘要://编辑 protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { this.GridView1.EditIndex = e.NewEditIndex; dataBind(); } //取消 protected void G... 阅读全文
posted @ 2009-04-02 13:47 萌子 阅读(277) 评论(0) 推荐(0)
asp.net输出html

摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->WebRequest mywebrq; WebResponse mywebresp; StreamReader sr; Streamwriter sw; ... 阅读全文
posted @ 2009-03-30 15:20 萌子 阅读(398) 评论(0) 推荐(0)
添加一个确认窗口

摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> ' OnCommand="LinkButtonC... 阅读全文
posted @ 2009-03-30 15:19 萌子 阅读(125) 评论(0) 推荐(0)
防止多次点击

摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 需要引用using System.Text; Code highlighting produced by Actipro CodeHighlighter (freeware)http... 阅读全文
posted @ 2009-03-30 15:12 萌子 阅读(173) 评论(0) 推荐(0)
多文件上传

摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.c... 阅读全文
posted @ 2009-03-30 15:04 萌子 阅读(168) 评论(0) 推荐(0)
操作XML文件

摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 using System; 2 using System.Collections; 3 using System.ComponentModel; 4 ... 阅读全文
posted @ 2009-03-30 14:42 萌子 阅读(135) 评论(0) 推荐(0)
常用转换函数

摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 curre... 阅读全文
posted @ 2009-03-30 14:40 萌子 阅读(163) 评论(0) 推荐(0)
gridview鼠标经过行换色代码

摘要:选中gridview再选择事件 protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.A... 阅读全文
posted @ 2009-03-26 15:48 萌子 阅读(179) 评论(0) 推荐(0)
从excel批量倒入数据库

摘要:private DataSet GetCollection() { DataSet ds=new DataSet(); string strCon,strCmm; //strCon="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\irms\\tmp\\irsbd.xls;Extended Properties=Excel 8.0;"; strC... 阅读全文
posted @ 2009-03-25 09:40 萌子 阅读(226) 评论(0) 推荐(0)
asp.net将EXCEL导入到SQL数据库

摘要:public void Button1_Click(object sender, System.EventArgs e) { string mystring="Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source = 'e:/SIGN.xls';Extended Properties=Excel 8.0"; OleDbConnection cnn... 阅读全文
posted @ 2009-03-25 09:36 萌子 阅读(234) 评论(0) 推荐(0)
gridview导出excel总结

摘要:HttpContext curContext = System.Web.HttpContext.Current; System.IO.StringWriter strWriter = new StringWriter(); System.Web.UI.HtmlTextWriter htmlWriter = new HtmlTextWriter(s... 阅读全文
posted @ 2009-03-24 11:01 萌子 阅读(146) 评论(0) 推荐(0)

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3