In the controlle,r I have this code:
var result = Request.Form[0];
where result has a value of 123,test,12,45,12/23/2010...etc..
How can I store each value in one variable?
In the controlle,r I have this code:
var result = Request.Form[0];
where result has a value of 123,test,12,45,12/23/2010...etc..
How can I store each value in one variable?
It sounds like you're asking to have each of those values stored in a variable. It's not clear, as the question is written, what your end goal is.
Consider simply accessing those values by their array position.
string[] myValues = Request.Form[0]
.ToString()
.Split(',', StringSplitOptions.RemoveEmptyEntries);
foreach (string value in myValues)
{
//do something
}
or
string customerID = myValues[0];
string customerName = myValues[1];