我是武男, 24歲, 大家都叫我阿男...有的人還會叫我白目研究生...

範例將擷取用戶端的表單集合,並將每一個表單的名稱寫入 HTTP 輸出 by C#

Autor 白目研究生

專案需要,找了個API是這樣子用的

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>”); }

MSDN也不知道是怎麼做的

要先using System.Collections.Specialized;也不講

怒

CommentComment