FormMethod 枚举

定义

注意

The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.

将窗体的提交类型指定为 GET 或 POST 请求。 此类不能被继承。 有关如何开发 ASP.NET 移动应用程序的信息,请参阅 移动应用 & 具有 ASP.NET 的网站

C#
public enum FormMethod
C#
[System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")]
public enum FormMethod
继承
FormMethod
属性

字段

名称 说明
Get 0

使用 GET 请求提交窗体。 此 API 已废弃不用。 有关如何开发 ASP.NET 移动应用程序的信息,请参阅 移动应用 & 具有 ASP.NET 的网站

Post 1

使用 POST 请求提交窗体。 此 API 已废弃不用。 有关如何开发 ASP.NET 移动应用程序的信息,请参阅 移动应用 & 具有 ASP.NET 的网站

注解

枚举 FormMethod 表示提交表单的方式。 当窗体的 属性设置为 GetMethod,GET 请求会限制其可以发布的数据量。 使用 GET 请求时,某些类型的回发可能会失败。 使用 GET 请求的优点是,所有参数都指定为 URL 的一部分,你可以缓存或保存 URL。

适用于

产品 版本 (已过时)
.NET Framework 1.1, 2.0, 3.0, 3.5 (4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)