asp.netÖÐÓÃsoapheader×÷ÑéÖ¤µÄʹÓò½Ö裺 ºÜ¼òµ¥
Asp.netÒ³ÃæÖе÷ÓÃÒÔSOAPÍ·×÷ÑéÖ¤µÄweb services²Ù×÷²½Ö裺
µÚÒ»²½£ºÓÃÀ´×÷SOAPÑéÖ¤µÄÀà±ØÐë´ÓSoapHeaderÀàÅÉÉú£¬ÀàÖÐPublicµÄÊôÐÔ½«³öÏÖÔÚ×Ô¶¯²úÉúXML½ÚµãÖУ¬¼´£º
<soap:Header>
<UserSoapHeader xmlns="http://tempuri.org/">
<UserName>string</UserName>
<Pwd>string</Pwd>
</UserSoapHeader>
</soap:Header>
public class UserSoapHeader : SoapHeader
{
private string _userName;
private string _pwd;
//publicµÄÊôÐÔ½«×Ô¶¯Éú³Éxml½áµã
public string UserName
{
get { return _userName; }
set { _userName = value; }
}
public string Pwd
{
get { return _pwd; }
set { _pwd = value; }
}
}
µÚ¶þ²½£º
ÔÚWebServices·þÎñÀàÖÐÌí¼ÓÒ»¸öpublicµÄÊôÐÔ(±ØÐëpublic)£¬ÀàÐÍΪ´ÓUserSoapHeader
/// <summary>
/// WebService µÄժҪ˵Ã÷
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class WebService : System.Web.Services.WebService
{
//´ËÊôÐÔ½«×÷ΪÑéÖ¤ÊôÐÔ
//·½·¨µÄSoapHeaderAttributeÖеÄÃû³ÆÓë´Ë±äÁ¿Ò»ÖÂ
public UserSoapHeader userHeader;
public WebService()
{
//Èç¹ûʹÓÃÉè¼ÆµÄ×é¼þ£¬ÇëÈ¡Ïû×¢ÊÍÒÔÏÂÐÐ
//InitializeComponent();
}
[WebMethod]
[SoapHeader("userHeader")]//ÕâÀïºÜÖØÒª£¬Ãû³ÆÒªºÍ¶¨ÒåµÄÑéÖ¤ÊôÐÔÃû³ÆÒ»ÖÂ!
public string HelloWorld()
&nb
Ïà¹ØÎĵµ£º
http://www.cnblogs.com/wyforumid/archive/2008/05/14/1196155.html
Ê×ÏȶÔÒÔÉϵÄÔ´´Õß˵¶Ô²»ÆðÏ£¬Î´¾Í¬Òâ¾Í¸ÄÁËËûµÄÔ´Â룬»¹°Ñ¸ÄºóµÄÔ´Âë·¢³öÀ´¡£
Ö÷Òª¸ÄµÄµØ·½¾ÍÊǵØÖ·À¸ÀïµÄ¶«¶«ÁË£¬ÔÎÄ¿ÉÒÔ¿´ÒÔÉϵģ¬ÎÒÌùÉÏ×Ô¼º¸ÄºóµÄÔ´Âë°É
Default.aspxÎļþ
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="D ......
ÔÎÄת×Ô£ºIT¹¤³Ì¼¼ÊõÍø,http://www.systhinker.com/index.php?action-viewnews-itemid-10320-php-1
ASP.NET 4.0ÊÇASP.NETµÄ×îа汾£¬Ëü¼¯³ÉÓÚ.NEt¿ò¼Ü4.0ÖС£ÔÚÕâÀïÎÒÃǽ«Ò»Æð̽¾¿Ò»Ï£¬ÎÒÈÏΪ×î¾ßASP.NET 4.0ÌØÐÔµÄÆß¸ö·½Ãæ¡£
ASP.NET 4.0Ìṩ¶ÔÍøÕ¾ÒÔ¼°ÍøÂçÓ¦ÓÃÏîÄ¿µÄÖ§³Ö·þÎñ¡£Ä¬ÈϵÄASP.NETÓ¦ÓóÌÐòÌṩÁËÒ»¸ö±È½ ......
**//// <summary>
x _0O%f+K)B5D /// Ö§³Ö¶ÏµãÐø´«µÄÏÂÔØ´óÎļþµÄº¯Êý Öв©IT½ÌÓýÍø4P z\2b,h-q `
/// </summary>
_;B$A.} S8E#@ D I /// <param name="downloadFil ......
1.´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="++"')</script>")
½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1.Attributes.Add("onclick","return ......