当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: //调用示例:/*2003-7-11.支持Pro
 

 

 ·动态加栽程序集(二)    »显示摘要«
    摘要: 正式开始本文:在 .net 框架中,将程序集加载至应用程序域的方法有几种。每种方法使用不同的类。 ......
 ·自定义asp.net控件分析(二)    »显示摘要«
    摘要: 自定义asp.net控件分析(二) ......


C#写的HttpRequsetResponse类,异步、事件...还热乎着呢!

//调用示例:

2003-7-1 【程序编程相关:设计模式之C#实现(一)--Abstra

/* 【推荐阅读:设计模式之C#实现(一)--Abstra

2.可指定同步或异步 【扩展信息:VC++.NET的寄存器al的Bug

1.支持proxy

3.一些小修改

*/

private void button1_click(object sender, system.eventargs e)

 {

  httprequestresponse xx = new httprequestresponse();

  xx.dataarrival += new dataarrivaleventhandler(xx_dataarrival);

  //xx.sendrequest(@"http://localhost:2080/examples/myservlets/servlet2","message=qq&desttel=13910911925&mytel=13910081138&mypwd=263996211");

  xx.sendrequest(@"http://localhost","message=你好qq&desttel=13910911925&mytel=13910081138&mypwd=263996211","get",true);

  xx.sendrequest("http://localhost/quickstart/util/srcview.aspx?path=/quickstart/howto/samples/net/webrequests/clientgetasync.src","post",false);

 }

private int i=0;

private void xx_dataarrival(object sender, dataarrivaleventargs e)

 {

  console.writeline( i++);

  console.write(e.recieveddata  );

  if (e.iscomplete)

   {

   console.write("[" + ((httprequestresponse) sender).request.cookiecontainer.getcookieheader(((httprequestresponse) sender).response.responseuri).tostring() + "]");

   }

  }

//========================

//class1.cs

using system;

using system.net;

using system.threading;

using system.text;

using system.io;


...   下一页
 ·用asp、net开发下载系统(一)    »显示摘要«
    摘要: 用 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE