- 博客(7)
- 收藏
- 关注
原创 C#连接数据库
//查询 try { string sql = "select * from table"; string constr = "server=.;database=DB_Name;user id=sa;password=123"; SqlConnection objConnection = new SqlConnection(constr); obj
2015-05-28 17:57:09
341
原创 列表中的GridViewRow事件
后台: protected void GV_RowCommand(object sender,GridViewCommandEventArgs e) { int rowIndex = Convert.ToInt32(e.CommandArgument);//获取事件行 GridViewRow gvr = GV.Rows[rowIndex];//事件行
2015-05-28 17:30:01
388
原创 ScriptManager控件的使用
Form里面加入这两个控件 asp:ScriptManager ID="ScriptManager1" runat="server"> asp:ScriptManager> asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"> asp:ScriptManagerProxy> asp:UpdatePan
2015-05-28 17:27:45
753
转载 listbox控件用法详解
1. 属性列表: SelectionMode 组件中条目的选择类型,即多选(Multiple)、单选(Single) Rows 列表框中显示总共多少行 Selected 检测条目是否被选中 SelectedItem 返回的类型是ListItem,获得列表框中被选择的条目 Count 列表框中条目的总数 SelectedIndex 列表框中被选择项的索引值 Items 泛
2015-05-28 17:24:00
2653
原创 几种Ajax方法
Ajax方法1: 前台aspxjs代码: script language="javascript" type="text/javascript"> function CallServer() { var a = document.getElementById("text").value; =ClientScript.GetCallbackEventReference(this,"
2015-05-28 17:19:29
371
转载 正则表达式,匹配身份证,js验证
//身份证正则表达式(15位) /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$/ //身份证正则表达式(18位) /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{4}$/; 1、简单的正则表达式: (1)pre
2015-05-28 17:08:08
682
转载 常用正则表达式以及C#用法
匹配中文字符的正则表达式: [u4e00-u9fa5] 评注:匹配中文还真是个头疼的事,有了这个表达式就好办了 匹配双字节字符(包括汉字在内):[^x00-xff] 评注:可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1) 匹配空白行的正则表达式:ns*r 评注:可以用来删除空白行 匹配HTML标记的正则表达式:]*>.*?|
2015-05-28 16:59:44
467
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅