文章分类 -  c# .net

web应用程序的核心工作部件:控件以及对客户端、服务器端代码的统一管理组装。
.net 中Session(依赖cookie) 在个别浏览器中丢失(X5内核)的解决方案
摘要:Session的几种存储方式就不在这里赘述了,直接切入正题: 由于X5内核有一套独立的处理cookie的机制,当前进程结束时,会去检测cookie有效期,当检测不到的时候,会杀掉这个cookie。 介于以上原因,在服务器端,设置session后(.net 会自动产生一个cookie:ASP.NET_ 阅读全文

posted @ 2016-10-21 17:43 zhangsir 阅读(713) 评论(0) 推荐(0)

c#.et 窗体应用程序,打开指定文件夹,选中文件的方法
摘要:private void btnOpenFile_Click(object sender, EventArgs e) { string _FilePath = this.txtFileFullPath.Text.Trim(); if (File.Exists(_FilePath)) { //打开指定文件 System.Diagnostics.Process.Start(_FilePath); } } ... 阅读全文

posted @ 2013-10-25 11:54 zhangsir 阅读(532) 评论(0) 推荐(0)

c# 一个应用于网页抓取的方法!有效截取字符串
摘要:1 public static string GetWebPageContent(string strUrl, string strBegin, string strEnd, int iBegin, int iEnd, string[] arrOld, string[] arrNew) 2 { 3 string strOriginal = ""; ... 阅读全文

posted @ 2007-11-11 16:04 zhangsir 阅读(687) 评论(0) 推荐(0)

在ASP.NET中使用存储过程(转录)
摘要:1、首先要查看一下页面中是否引用了 System.Data.Sqlclient;当然数据库连接是必不可少的 2、Asp.Net中调用数据的步骤: (1)、 新建一个数据库连接对象(一般用SqlConnection) (2)、用Open()方法打开我们要操作的数据库 (3)、创建一个SqlCommand或SqlDataAdapter对象 (4)、对SQL命令或存... 阅读全文

posted @ 2007-10-30 15:07 zhangsir 阅读(374) 评论(0) 推荐(0)