惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

雷峰网
雷峰网
月光博客
月光博客
S
Security Affairs
宝玉的分享
宝玉的分享
D
DataBreaches.Net
MongoDB | Blog
MongoDB | Blog
Cloudbric
Cloudbric
PCI Perspectives
PCI Perspectives
B
Blog RSS Feed
腾讯CDC
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Attack and Defense Labs
Attack and Defense Labs
N
News and Events Feed by Topic
T
The Blog of Author Tim Ferriss
H
Help Net Security
Vercel News
Vercel News
W
WeLiveSecurity
U
Unit 42
S
SegmentFault 最新的问题
Microsoft Azure Blog
Microsoft Azure Blog
Google Online Security Blog
Google Online Security Blog
云风的 BLOG
云风的 BLOG
Google DeepMind News
Google DeepMind News
S
Schneier on Security
The Register - Security
The Register - Security
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Announcements
Recent Announcements
博客园 - Franky
H
Hacker News: Front Page
WordPress大学
WordPress大学
I
Intezer
M
MIT News - Artificial intelligence
博客园 - 叶小钗
The Last Watchdog
The Last Watchdog
T
Troy Hunt's Blog
Stack Overflow Blog
Stack Overflow Blog
Microsoft Security Blog
Microsoft Security Blog
L
Lohrmann on Cybersecurity
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
I
InfoQ
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Schneier on Security
Schneier on Security
P
Proofpoint News Feed
V
V2EX
Help Net Security
Help Net Security
小众软件
小众软件
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
大猫的无限游戏
大猫的无限游戏
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs

博客园 - Rain@sz

C#多线程编程(转) 调用webservice类(转) webService动态编译(编译在内存中,不会有权限问题) 什么是AOP? (摘) 阿里巴巴信息抓取器 脏读、不可重复读和虚读。(数据库)摘 c#写Activex控件(.Net 2.0) SPS中模拟登陆 sql server 2005分页存储过程和sql server 2000分页存储过程(摘) net的辅助工具 Memento Pattern(备忘录模式) Interpreter Pattern(解释器模式) State Pattern(状态模式) Mediator Pattern(中介者模式) 动态调用Webservice(摘) 分页--页脚控件 RSS 标准 DP-還未添加 DP-职责链模式(Chain of Responsibility)
ajax基本函数--js
Rain@sz · 2007-12-29 · via 博客园 - Rain@sz

function AjaxData(url, domId){
 var http_request = null;
 if (window.XMLHttpRequest) {
  http_request = new XMLHttpRequest();
  if (http_request.overrideMimeType)
   http_request.overrideMimeType('text/html');
 } else if (window.ActiveXObject) {
  try {
   http_request = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
   try {
    http_request = new ActiveXObject("Microsoft.XMLHTTP");
   } catch (e) {}
  }
 }
 if (http_request==null)
  return false;
 
 http_request.onreadystatechange = function(){
  if (http_request.readyState == 4) {
   if (http_request.status == 200) {  
   
   document.getElementById(domId).innerHtml=http_request.responseText;   
   //alert(document.getElementById(domId).innerText);
   } else {
    return false;
   }
  }
 }
 http_request.open("POST", url, true);
 http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
 http_request.send();
 return true;
}

function AjaxSendData(url,func){
 var http_request = null;
 if (window.XMLHttpRequest) {
  http_request = new XMLHttpRequest();
  if (http_request.overrideMimeType)
   http_request.overrideMimeType('text/html');
 } else if (window.ActiveXObject) {
  try {
   http_request = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
   try {
    http_request = new ActiveXObject("Microsoft.XMLHTTP");
   } catch (e) {}
  }
 }
 if (http_request==null)
  return false;
 
 http_request.onreadystatechange = function(){
  if (http_request.readyState == 4) {
   if (http_request.status == 200) {
   func(http_request.responseText);   
   } else {
    return false;
   }
  }
 }
 http_request.open("POST", url, true);
 http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
 http_request.send();
 return true;
}

假如send方法发送了数据,则可以这样来获取send过来的数据
System.IO.Stream instream = Page.Request.InputStream;
BinaryReader br 
= new BinaryReader(instream,System.Text.Encoding.UTF8);
byte[] byt = br.ReadBytes((int)instream.Length);
string sXml = System.Text.Encoding.UTF8.GetString(byt);