易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net构建Web服务基础(含SOAP相关知识)

WSDL:是一个用来描述Web服务和说明如何与Web服务通信的XML语言。 怎样向别人介绍你的Web service有什么功能,以及每个函数调用时的参数等等。
 
web服务:进行web上数据交换的方法。能够以纯xml方式通信。
 
SOAP:简单对象存取协议。可看做xml方言; 以SOAP信封来传递和响应文本(包含:首部、主体)HTTP POST
 
VS中建立web服务项目 (vs自动生成soap信封)
 
主文件Service.cs 如下:
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
public Service () {
//如果使用设计的组件,请取消注释以下行
//InitializeComponent();
}
[WebMethod]
public string HelloWorld(string name) {
return "Hello World!"+name;
}

}

运行项目返回xml数据:
<?xml version="1.0" encoding="utf-8" ?>
<string xmlns="http://tempuri.org/">Hello World!homsky</string>


相关文档:

如何实现Asp.Net控件的双击事件

 Asp.net控件(包括Web服务器控件和Html服务器控件)都没有双击事件,那么该如何将双击事件付给Asp.Net控件呢?我们以Lable控件为例。
      
        一、首先加入控件,ID为Lable1,然后加入一个Button控件,ID为Button1,代码如下
 
& ......

关于ASP.NET/C#中对Cookie的操作

写cookie
  1 HttpCookie cookie = new HttpCookie("Info");//定义cookie对象以及名为Info的项
  2 DateTime dt = DateTime.Now;//定义时间对象
  3 TimeSpan ts=new TimeSpan(1,0,0,0);//cookie有效作用时间,具体查msdn
  4 cookie.Expires = dt.Add(ts);//添加作用时间
  5 cookie.Values.Add("user","cx ......

ASP.NET 创建XML

 public void CreatXml(int oid)
        {
            XmlTextWriter writer = null;
           string fileName ="a"+ oid.ToString() + ".xml";
   ......

asp.net 页面延时五秒,跳转到另外的页面

asp.net 页面延时五秒,跳转到另外的页面的实现代码。
--前台
复制代码 代码如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Successed.aspx.cs" Inherits="Biz_Order_Successed" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xht ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号