<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>耿振的博客 &#187; c#</title>
	<atom:link href="http://blog.bordf.com/category/server/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bordf.com</link>
	<description>这个世界注定有人比自己更高，更强，更好，这是不争的事实，但我不能因此而放弃奔跑！有时候贪图安逸、总为以后着想，往往扼杀了 腾飞的 希望！</description>
	<lastBuildDate>Thu, 19 Aug 2010 14:47:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>c# 拖动 form</title>
		<link>http://blog.bordf.com/547/</link>
		<comments>http://blog.bordf.com/547/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 04:00:24 +0000</pubDate>
		<dc:creator>bordf</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://blog.bordf.com/?p=547</guid>
		<description><![CDATA[using System;
using System.ComponentModel;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
protected override void  WndProc(ref Message m)
{
if (m.Msg == 0&#215;0201) //鼠标左键按下去的消息
{
m.Msg = 0&#215;00A1;//更改消息为非客户区按下鼠标
m.LParam = IntPtr.Zero;//默认值
m.WParam = new IntPtr(2);//鼠标放在标题栏内
}
base.WndProc(ref m);
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
巨简单
]]></description>
		<wfw:commentRss>http://blog.bordf.com/547/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>c# 获取当前系统用户的桌面代码</title>
		<link>http://blog.bordf.com/511/</link>
		<comments>http://blog.bordf.com/511/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 02:43:03 +0000</pubDate>
		<dc:creator>bordf</dc:creator>
				<category><![CDATA[c#]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[桌面]]></category>
		<category><![CDATA[用户]]></category>
		<category><![CDATA[系统]]></category>

		<guid isPermaLink="false">http://blog.bordf.com/?p=511</guid>
		<description><![CDATA[string dir = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);

一句话搞定。
]]></description>
		<wfw:commentRss>http://blog.bordf.com/511/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>统计蜘蛛访问痕迹 net版~</title>
		<link>http://blog.bordf.com/431/</link>
		<comments>http://blog.bordf.com/431/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 00:36:02 +0000</pubDate>
		<dc:creator>bordf</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://blog.bordf.com/?p=431</guid>
		<description><![CDATA[很遗憾，在虚拟主机上只能统计到映射到 .NET 筛选上的文件，比如aspx 文件等。
html还是在通常情况下是不可以的，虽然在调试的时候可以~
解决办法也有。那就是在iis中映射html等需要统计的静态文件后缀到.net筛选上，但是，要是能修改这个的话，直接读IIS日志就OK了。就没有必要去专门耗资源的去使用此程序去统计啦~~~
也可能在web.config中定义出来，但是我没成功，希望成功的人能给我留言~
谢谢了~~~
code
]]></description>
		<wfw:commentRss>http://blog.bordf.com/431/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>.net aspx 利用smtp 发送邮件email 简单实用版</title>
		<link>http://blog.bordf.com/397/</link>
		<comments>http://blog.bordf.com/397/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 03:31:45 +0000</pubDate>
		<dc:creator>bordf</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://blog.bordf.com/?p=397</guid>
		<description><![CDATA[前提是发件邮箱开启了smtp；
using System.Net.Mail;
if (!string.IsNullOrEmpty(Request.Form["email"]) &#38;&#38; !string.IsNullOrEmpty(Request.Form["content"]) &#38;&#38; !string.IsNullOrEmpty(Request.Form["title"]) &#38;&#38; !string.IsNullOrEmpty(Request.Form["name"]))
{
string title = Request.Form["title"].ToString();
string mail = Request.Form["email"].ToString();
string content = Request.Form["content"].ToString();
string name = Request.Form["name"].ToString();
MailMessage message = new MailMessage();
message.From = new MailAddress(&#8220;mailsend@bordf.com&#8221;, name);
message.To.Add(new MailAddress(mail)); // the email you want to send email to
message.Subject = title;
message.IsBodyHtml = true;
message.BodyEncoding = System.Text.Encoding.UTF8;
message.Body = content;
message.Priority = MailPriority.Normal;
SmtpClient client = new SmtpClient(&#8220;smtp.bordf.com&#8221;, 25);
client.Credentials = [...]]]></description>
		<wfw:commentRss>http://blog.bordf.com/397/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web.config来进行301定向和rewrite规则的使用~ 实例中包含discuz rewrite规则~</title>
		<link>http://blog.bordf.com/395/</link>
		<comments>http://blog.bordf.com/395/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 03:22:20 +0000</pubDate>
		<dc:creator>bordf</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://blog.bordf.com/?p=395</guid>
		<description><![CDATA[&#60;configuration&#62;
&#60;system.webServer&#62;
&#60;httpRedirect enabled=&#8221;true&#8221; destination=&#8221;http://blog.bordf.com&#8221; httpResponseStatus=&#8221;Permanent&#8221; /&#62;   //301永久重定向
//rewrite规则部分开始 ，用于discuz
&#60;rewrite&#62;
&#60;rules&#62;
&#60;rule&#62;
&#60;match url=&#8221;faq.htm$&#8221; /&#62;
&#60;action url=&#8221;faq.php&#8221; /&#62;
&#60;/rule&#62;
&#60;rule&#62;
&#60;match url=&#8221;tag-(.+).html$&#8221; /&#62;
&#60;action url=&#8221;tag.php\?name={R:1}&#8221; /&#62;
&#60;/rule&#62;
&#60;rule &#62;
&#60;match url=&#8221;thread-([0-9]+)-([0-9]+)-([0-9]+).html$&#8221; /&#62;
&#60;action url=&#8221;viewthread.php?tid={R:1}&#38;amp;extra=page\%3D{R:3}&#38;amp;page={R:2}&#8221; /&#62;
&#60;/rule&#62;
&#60;rule &#62;
&#60;match url=&#8221;forum-([0-9]+)-([0-9]+).html$&#8221; /&#62;
&#60;action url=&#8221;forumdisplay.php?fid={R:1}&#38;amp;page={R:2}&#8221; /&#62;
&#60;/rule&#62;
&#60;/rules&#62;
&#60;/rewrite&#62;
//rewrite规则部分结束 ，用于discuz
&#60;httpErrors errorMode=&#8221;DetailedLocalOnly&#8221; /&#62;
&#60;asp scriptErrorSentToBrowser=&#8221;true&#8221; /&#62;
&#60;/system.webServer&#62;
&#60;appSettings/&#62;
&#60;connectionStrings/&#62;
&#60;system.web&#62;
&#60;/system.web&#62;
&#60;/configuration&#62;
]]></description>
		<wfw:commentRss>http://blog.bordf.com/395/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>简单的图形验证系统.net代码 ~</title>
		<link>http://blog.bordf.com/391/</link>
		<comments>http://blog.bordf.com/391/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 09:53:51 +0000</pubDate>
		<dc:creator>bordf</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://blog.bordf.com/?p=391</guid>
		<description><![CDATA[using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;
public partial class picture : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string checkCode = CreateRandomCode();
Session["CheckCode"] = checkCode;
CreateImage(checkCode);
}
private string CreateRandomCode()
{
//做个随机数库
string allChar = &#8220;0,1,2,3,4,5,6,7,8,9&#8243;;
//将库里的字符放到数组里去
string[] allCharArray = allChar.Split(&#8216;,&#8217;);
//定义RandomCode变量，为了存放生成的随机数。
string RandomCode = &#8220;&#8221;;
int temp = -1;
//实例Random函数
Random rand = new Random();
//for循环，这里是四次循环，为了是产生四个随机数，如果要产生多个，自己定义循环次数
for (int i = 0; i &#60; 4; i++)
{
if (temp != [...]]]></description>
		<wfw:commentRss>http://blog.bordf.com/391/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>访客统计程序demo，框架完成，架构补充我就不爱做了~ 所以就这样~</title>
		<link>http://blog.bordf.com/387/</link>
		<comments>http://blog.bordf.com/387/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 07:30:26 +0000</pubDate>
		<dc:creator>bordf</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://blog.bordf.com/?p=387</guid>
		<description><![CDATA[Spidertest.aspx
&#60;form id=&#8221;form1&#8243;&#62;
&#60;div&#62;&#60;img src=&#8221;http://stats.bordf.com/spider.aspx?site=test&#8221; border=&#8221;0&#8243; alt=&#8221;" width=&#8221;0&#8243; height=&#8221;0&#8243; /&#62;&#60;/div&#62;
&#60;/form&#62;
spider.aspx

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
public partial class spider : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(Request.QueryString["site"]))
{
string site, ip, url, time, agent,content;
site = Request.QueryString["site"];
ip = Request.UserHostAddress.ToString();
if (!string.IsNullOrEmpty(Request.ServerVariables["HTTP_REFERER"]))
{
url = Request.ServerVariables["HTTP_REFERER"].ToString();
}
else
{
url = &#8220;null&#8221;;
}
time = DateTime.Now.ToString();
agent = Request.UserAgent.ToString();
agent = agen(agent);
content = time + &#8221;  [...]]]></description>
		<wfw:commentRss>http://blog.bordf.com/387/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DOS操作Sqlite命令大全</title>
		<link>http://blog.bordf.com/289/</link>
		<comments>http://blog.bordf.com/289/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 01:01:11 +0000</pubDate>
		<dc:creator>bordf</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.bordf.com.cn/?p=289</guid>
		<description><![CDATA[数据库、表的建立，记录的添加、查询、修改和删除
F:\&#62;sqlite3 database.db
sqlite&#62; create table admin(username text,age integer);
sqlite&#62; insert into admin values(&#8216;kuang&#8217;,25);
sqlite&#62; select * from admin;
sqlite&#62; update admin set username=&#8217;kk&#8217;,age=24 where username=&#8217;kuang&#8217; and age=25;
sqlite&#62; delete from admin where username=&#8217;kk&#8217;;
注：每条sql语句后必须以&#8221;;&#8221;号结尾！
2.Sqlite系统命令
.bail ON&#124;OFF           Stop after hitting an error.  Default OFF
.databases             List names and files of attached databases(查看目前挂的数据库)
.dump ?TABLE? &#8230;      Dump the database in an SQL text format(以SQL格式输出表结构)
.echo ON&#124;OFF           Turn command echo [...]]]></description>
		<wfw:commentRss>http://blog.bordf.com/289/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# 向web网站GET、POST 数据</title>
		<link>http://blog.bordf.com/287/</link>
		<comments>http://blog.bordf.com/287/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 00:57:32 +0000</pubDate>
		<dc:creator>bordf</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.bordf.com.cn/?p=287</guid>
		<description><![CDATA[

HttpWebRequest 是 .net 基类库中的一个类，在命名空间 System.Net 下面，用来使用户通过 HTTP 协议和服务器交互。

HttpWebRequest 对 HTTP 协议进行了完整的封装，对 HTTP 协议中的 Header, Content, Cookie 都做了属性和方法的支持，很容易就能编写出一个模拟浏览器自动登录的程序。
程序使用 HTTP 协议和服务器交互主要是进行数据的提交，通常数据的提交是通过 GET 和 POST 两种方式来完成，下面对这两种方式进行一下说明：
1. GET 方式。 GET 方式通过在网络地址附加参数来完成数据的提交，比如在地址 http://www.google.com/webhp?hl=zh-CN 中，前面部分 http://www.google.com/webhp 表示数据提交的网址，后面部分 hl=zh-CN 表示附加的参数，其中 hl 表示一个键(key)， zh-CN 表示这个键对应的值(value)。程序代码如下：
HttpWebRequest req = (HttpWebRequest) HttpWebRequest.Create( &#8220;http://www.google.com/webhp?hl=zh-CN&#8221; );
req.Method = &#8220;GET&#8221;;
using (WebResponse wr = req.GetResponse())
{
//在这里对接收到的页面内容进行处理
}
2. POST 方式。 POST 方式通过在页面内容中填写参数的方法来完成数据的提交，参数的格式和 GET 方式一样，是类似于 [...]]]></description>
		<wfw:commentRss>http://blog.bordf.com/287/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C#模拟Post和Get方式发送数据</title>
		<link>http://blog.bordf.com/285/</link>
		<comments>http://blog.bordf.com/285/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 00:56:26 +0000</pubDate>
		<dc:creator>bordf</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.bordf.com.cn/?p=285</guid>
		<description><![CDATA[通过应用程序读取网页信息的时候，通常需要抓取网页的数据，但是有一个问题就是很多网页需要登录后才能够获得页面数据，那么就需要保存当前的 cookie，在.NET中可以使用CookieContainer 对象来保存登录后的Cookie信息，每次发送数据的时候加上Cookie信息，就可以解决这个问题了。
#region 同步通过POST方式发送数据
/// &#60;summary&#62;
/// 通过POST方式发送数据
/// &#60;/summary&#62;
/// &#60;param name=&#8221;Url&#8221;&#62;url&#60;/param&#62;
/// &#60;param name=&#8221;postDataStr&#8221;&#62;Post数据&#60;/param&#62;
/// &#60;param name=&#8221;cookie&#8221;&#62;Cookie容器&#60;/param&#62;
/// &#60;returns&#62;&#60;/returns&#62;
public string SendDataByPost(string Url,string postDataStr,ref CookieContainer cookie)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url);
if (cookie.Count == 0)
{
request.CookieContainer = new CookieContainer();
cookie = request.CookieContainer;
}
else
{
request.CookieContainer = cookie;
}
request.Method = &#8220;POST&#8221;;
request.ContentType = &#8220;application/x-www-form-urlencoded&#8221;;
request.ContentLength = postDataStr.Length;
Stream myRequestStream = request.GetRequestStream();
StreamWriter myStreamWriter = new StreamWriter(myRequestStream, Encoding.GetEncoding(&#8220;gb2312&#8243;));
myStreamWriter.Write(postDataStr);
myStreamWriter.Close();
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream myResponseStream = response.GetResponseStream();
StreamReader myStreamReader = [...]]]></description>
		<wfw:commentRss>http://blog.bordf.com/285/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C#中PictureBox异步加载图片~</title>
		<link>http://blog.bordf.com/283/</link>
		<comments>http://blog.bordf.com/283/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 00:48:31 +0000</pubDate>
		<dc:creator>bordf</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.bordf.com.cn/?p=283</guid>
		<description><![CDATA[在PictureBox加载图片时，能不能显示等待，加载完毕后再显示真正的图片&#8230;
void Button1Click(object sender, EventArgs e)
{
//图片异步加载完成后的处理事件
pictureBox1.LoadCompleted += new AsyncCompletedEventHandler(pictureBox1_LoadCompleted);
//图片加载时，显示等待光标
pictureBox1.UseWaitCursor = true;
//采用异步加载方式
pictureBox1.WaitOnLoad = false;
//开始异步加载，图片的地址，请自行更换
pictureBox1.LoadAsync("图片地址");
}
void pictureBox1_LoadCompleted(object sender, AsyncCompletedEventArgs e)
{
//图片加载完成后，将光标恢复
pictureBox1.UseWaitCursor = false;
}

留着备用~
]]></description>
		<wfw:commentRss>http://blog.bordf.com/283/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.net C#获得网页完整代码函数.. WebRequest方式的&#8230;前面有webclient方式的~</title>
		<link>http://blog.bordf.com/267/</link>
		<comments>http://blog.bordf.com/267/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 03:16:36 +0000</pubDate>
		<dc:creator>bordf</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.bordf.com.cn/?p=267</guid>
		<description><![CDATA[ webclient  的延时并不好， 所以后来使用的是 WebRequest方式获得代码~
using System.Net;
using System.Text.RegularExpressions;
using System.Web;
using System.IO;
 private string getHtml(string url)
        {
            HttpWebRequest myRequest;
            HttpWebResponse myResp = null;
      [...]]]></description>
		<wfw:commentRss>http://blog.bordf.com/267/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.net读取mssql基础语句&#8211; 使用web.config保存数据库字符串</title>
		<link>http://blog.bordf.com/265/</link>
		<comments>http://blog.bordf.com/265/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 08:30:10 +0000</pubDate>
		<dc:creator>bordf</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.bordf.com.cn/?p=265</guid>
		<description><![CDATA[web.config 中 加入
  
    
  
Connect Timeout=300 是连接超时时间！
程序中读取：
using System.Configuration;
using System.Data.SqlClient;
  SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["datastr"]);
     SqlCommand cmd = new SqlCommand(&#8220;sql语句&#8221;, con);
     con.Open();
     SqlDataReader dr = cmd.ExecuteReader();
      while (dr.Read())
     [...]]]></description>
		<wfw:commentRss>http://blog.bordf.com/265/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>提交获得到的cookie来获取需要登录的网页代码~</title>
		<link>http://blog.bordf.com/263/</link>
		<comments>http://blog.bordf.com/263/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 01:58:49 +0000</pubDate>
		<dc:creator>bordf</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.bordf.com.cn/?p=263</guid>
		<description><![CDATA[using System.Net;
  private string getHtml(string url)
        {
            WebClient myWebClient = new WebClient();
            myWebClient.Headers.Add(&#8220;Cookie&#8221;, &#8220;cookie内容&#8243;);
            [...]]]></description>
		<wfw:commentRss>http://blog.bordf.com/263/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>c#使用ftp上传多线程技术实现 progressBar显示不卡死代码</title>
		<link>http://blog.bordf.com/261/</link>
		<comments>http://blog.bordf.com/261/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 05:20:45 +0000</pubDate>
		<dc:creator>bordf</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.bordf.com.cn/?p=261</guid>
		<description><![CDATA[using System.Net;
using System.IO;
using System.Threading;
记得添加他们~
  public string doc, fname, tname;
 private FtpStatusCode UploadFun(string fileName, string uploadUrl)
        {
            Stream requestStream = null;
            FileStream fileStream = null;
  [...]]]></description>
		<wfw:commentRss>http://blog.bordf.com/261/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
