.net接收post請求並把數據轉爲字典格式

public SortedDictionary<string, string> GetRequestPost()
{
int i = 0;
SortedDictionary<string, string> sArray = new SortedDictionary<string, string>();
NameValueCollection coll = Request.Form;orm

String[] requestItem = coll.AllKeys;string

for (i = 0; i < requestItem.Length; i++)
{
sArray.Add(requestItem[i], Request.Form[requestItem[i]]);
}io

coll.Clear();request

return sArray;
}co

調用:new

SortedDictionary<string, string> sPara = GetRequestPost();return

相關文章
相關標籤/搜索