HttpRequest.Form HttpRequest.Form HttpRequest.Form HttpRequest.Form Property

정의

폼 변수의 컬렉션을 가져옵니다.Gets a collection of form variables.

public:
 property System::Collections::Specialized::NameValueCollection ^ Form { System::Collections::Specialized::NameValueCollection ^ get(); };
public System.Collections.Specialized.NameValueCollection Form { get; }
member this.Form : System.Collections.Specialized.NameValueCollection
Public ReadOnly Property Form As NameValueCollection

속성 값

폼 변수의 컬렉션을 나타내는 NameValueCollection입니다.A NameValueCollection representing a collection of form variables.

예제

다음 예제에는 브라우저에서 게시 되는 양식 컬렉션에서 값을 읽는 방법을 보여 줍니다.The following example shows how to read the values in the form collection posted from a browser. 컬렉션에서 각 이름/값 쌍 형식 및 해당 값에서 컨트롤을 나타냅니다.Each name/value pair in the collection represents a control in the form and its value.

int loop1;
NameValueCollection coll;
 
//Load Form variables into NameValueCollection variable.
coll=Request.Form;
// Get names of all forms into a string array.
String[] arr1 = coll.AllKeys;
for (loop1 = 0; loop1 < arr1.Length; loop1++) 
{
   Response.Write("Form: " + arr1[loop1] + "<br>");
}
   
Dim loop1 As Integer
Dim arr1() As String
Dim coll As NameValueCollection
 
' Load Form variables into NameValueCollection variable.
coll=Request.Form

' Get names of all forms into a string array.
arr1 = coll.AllKeys
For loop1 = 0 To arr1.GetUpperBound(0)
   Response.Write("Form: " & arr1(loop1) & "<br>")
Next loop1
   

설명

합니다 Form 속성은 HTTP 요청 하는 경우 Content-Type 값은 "application/x-www-형식-urlencoded" 또는 "다중 파트/폼 데이터".The Form property is populated when the HTTP request Content-Type value is either "application/x-www-form-urlencoded" or "multipart/form-data".

적용 대상

추가 정보