FormMethod 枚举
定义
警告
此 API 现已过时。
将窗体的提交类型指定为 GET 或 POST 请求。Specifies the type of submission for a form as a GET or POST request. 此类不能被继承。This class cannot be inherited. 若要了解如何开发 ASP.NET 移动应用,请参阅 ASP.NET 移动应用和网站。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.
public enum class FormMethod
[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 https://go.microsoft.com/fwlink/?LinkId=157231.")]
public enum FormMethod
type FormMethod =
Public Enum FormMethod
- 继承
- 属性
字段
Get | 0 | 使用 GET 请求提交窗体。Uses a GET request to submit a form. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 ASP.NET 移动应用和网站。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. |
Post | 1 | 使用 POST 请求提交窗体。Uses a POST request to submit a form. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 ASP.NET 移动应用和网站。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. |
注解
FormMethod 枚举表示你将如何提交窗体。The FormMethod enumeration represents how you will submit a form. GET 请求,当窗体的 Method 属性设置为 Get
时,将限制它可发布的数据量。A GET request, when the Method property of the form is set to Get
, is limited in the amount of data it can post. 使用 GET 请求时,某些类型的回发可能会失败。Some types of postbacks might fail when using a GET request. 使用 GET 请求的优点是所有参数都指定为 URL 的一部分,可以缓存或保存 URL。The advantage of using a GET request is that all the parameters are specified as part of the URL, and you can cache or save the URL.