2014年12月14日

在Eclipse中查看JDK类库的源代码

摘要: 转自 http://www.cnblogs.com/gzgg/archive/2011/10/28/2227602.html在Eclipse中查看JDK类库的源代码设置:1.点 “window”-> "Preferences" -> "Java" -> "Installed JRES"2.此时"In... 阅读全文

posted @ 2014-12-14 16:57 Paste 阅读(164) 评论(0) 推荐(0) 编辑

eclipse自动补全的设置

摘要: 转自:http://www.cnblogs.com/dongritengfei/archive/2010/09/09/1822258.html如果你用过Visual Studio的自动补全功能后,再来用eclipse的自动补全功能,相信大家会有些许失望。 但是eclipse其实是非常强大的,ecl... 阅读全文

posted @ 2014-12-14 14:39 Paste 阅读(339) 评论(0) 推荐(0) 编辑

2011年7月27日

Repeater 嵌套

摘要: <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound"> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%#Eval("QuestionName") %>'></asp:Label> <asp:Label I 阅读全文

posted @ 2011-07-27 17:28 Paste 阅读(177) 评论(0) 推荐(0) 编辑

2011年6月22日

GridView添加行号

摘要: <asp:TemplateField HeaderText="序号"><ItemTemplate> <%# Container.DataItemIndex+1 %> </ItemTemplate></asp:TemplateField> 阅读全文

posted @ 2011-06-22 14:19 Paste 阅读(109) 评论(0) 推荐(0) 编辑

2011年5月19日

给按钮在后台添加属性

摘要: this.Button1.Attributes.Add("onclick","javascript:if(confirm('继续吗?');"){return true;}else{return false;}"); 阅读全文

posted @ 2011-05-19 14:10 Paste 阅读(164) 评论(0) 推荐(0) 编辑

关闭页面不弹出提示框

摘要: --关闭页面不弹出提示框Response.Write("<script>alert('您无权操作!');window.opener=null;window.open('','_self');window.close();</script>");--点击alert确定后 跳转页面Response.Write("<script>alert('该名已经存在!');window.location.href='WebForm2.aspx'</script 阅读全文

posted @ 2011-05-19 14:06 Paste 阅读(178) 评论(0) 推荐(0) 编辑

获取IP

摘要: public static string GetIP() { string result = String.Empty; result = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (null == result || result == String.Empty) { result = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; } if (null == result || 阅读全文

posted @ 2011-05-19 14:05 Paste 阅读(186) 评论(0) 推荐(0) 编辑

JS选择html页面中的checkbox实现全选

摘要: <!--html--><input id="Checkbox2" type="checkbox" onclick="check(this)" />全选 &nbsp;<asp:Button ID="btnAddFuJian" runat="server" Text="添加所选附件" OnClick="btnAddFuJian_Click" OnClientClick="return lessthan();&qu 阅读全文

posted @ 2011-05-19 14:03 Paste 阅读(5086) 评论(0) 推荐(0) 编辑

2011年4月26日

加密解密

摘要: /// <summary> /// 带有密钥的加解密 /// 加密 /// </summary> /// <param name="data"></param> /// <returns></returns> public static string KeyEncrypt(string str,string key) { DESCryptoServiceProvider provider = new DESCryptoServiceProvider(); provider.Key = Encoding. 阅读全文

posted @ 2011-04-26 11:05 Paste 阅读(201) 评论(0) 推荐(0) 编辑

2011年3月3日

C#使用事务

摘要: /// <summary> /// 执行多条SQL语句,实现数据库事务。 /// </summary> /// <param name="SQLStringList">多条SQL语句</param> public static int ExecuteSqlTran(List<String> SQLStringList) { using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); SqlCo 阅读全文

posted @ 2011-03-03 15:37 Paste 阅读(278) 评论(0) 推荐(0) 编辑

导航