soapheaders.aspx

来自「Professional ASP.NET source code」· ASPX 代码 · 共 25 行

ASPX
25
字号
<%@ Page Language="C#"%>

<script runat=server>
public void Page_Load(){
	// Create a new instance of the UsingSoapHeaders
	// proxy class used to call the remote .asmx file
	UsingSoapHeaders u = new UsingSoapHeaders();

	// Create a new instance of the mySoapHeader class
	MySoapHeader myHeader = new MySoapHeader();

	// Set the value of myHeader
	myHeader.Value = "Sample Header Text";

	// Set the MySoapHeader public member of the
	// UsingSoapHeaders class to myHeader
	u.MySoapHeaderValue = myHeader;
		
	// Get the result of the call
	string result = u.GetValueOfSoapHeader();
	span1.InnerHtml = result;
 }
</script>
<font size=6>The value of the SOAP header is: <font color=red><span id=span1 runat=server/></font></font>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?