ASP.NET Web Service协议相关
=================================================================================
How to enable an ASP.NET WebService to listen to HTTP POST calls
=================================================================================
Imagine you developed an ASP.NET WebService, but the client that needs to use it wants to call it using HTTP POST instead of SOAP.
As default, when accessed from the localhost, all webservices listen both to SOAP and HTTP POST calls, but if accessed from another host they
listen only to SOAP.
My friend Google found a page on the MSDN site that explains how to change the protocols accepted by the ASP.NET runtime to listen to web
services calls.
As all configuration settings it can be changed both at machine level (machine.config) and per single application inside the web.config.
The configuration section is named <webServices> and is inside the <system.web> section.
The default configuration (the one that is inside a newly installed machine.config) is the following:
<system.web>
...
<webServices>
<protocols>
<add name="HttpSoap"/>
<!-- <add name="HttpPost"/> -->
<!-- <add name="HttpGet"/> -->
<add name="Documentation"/>
<add name="HttpPostLocalhost"/>
</protocols>
</webServices>
...
</system.web
Option names are quite self explaining. So, in order to enable allow HTTP POST call
相关文档:
html知识,Request.Form
接收的是Name值,而非ID值
若是用aspx页面取值,表单中的runat="server"要去掉。
asp.net知识,asp.net的控件的ID和Name值是一样第,但是其在客户端表现是control.clientID而非
control.ID
asp.net本身也是可以跨页提交滴,如果是使用自己带的跨页提交就不存在上述问题,不过as ......
protected void btncancel_Click(object sender, EventArgs e)
{
Page.RegisterStartupScript("", "<mce:script type="text/javascript"><!--
window.close()
// --></mce:script>");
}
......
以前没有遇到,今天以前同事问这个问题,整出来做为收藏
直接贴代码:
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(SenFe_Replace("沉下心去做好每一件事_2010_2_1_asp.net_你一定行"));
& ......
方法1:
Response.Cookies["username"].Value="gjy";
Response.Cookies["username"].Expires=DateTime.Now.AddDays(1);
方法2:
System.Web.HttpCookie newcookie=new HttpCookie("username");
newcookie.Value="gjy";
newcookie.Expires=DateTime.Now.AddDays(1);
Response.AppendCookie(newcookie);
创建带 ......
看了asp.net 的回调技术后不是很理解。还是把写的东西贴下,自己以后学习时候多看看。前台index.aspx页<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="_Default" %>
<%@ Import Namespace = "System.Text" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transit ......