我想吐出Request.Form中的所有東西,這樣我就可以將它作爲字符串返回並查看我正在處理的內容。我試圖建立一個for循環...如何在不知道任何細節的情況下遍歷Request.Form?
// Order/Process
// this action is the submit POST from the pricing options selection page
// it consumes the pricing options, creates a new order in the database,
// and passes the user off to the Edit view for payment information collection
[AcceptVerbs(HttpVerbs.Post)]
public string Process()
{
string posted = "";
for(int n = 0;n < Request.Form.Count;n++)
posted += Request.Form[n].ToString();
return posted;
}
但所有我曾經得到的回覆是「12」,我知道有很多更多的東西的形式比上...
+1就是這樣:) – 2009-09-29 15:14:06