Cannot convert type “char” to “string” in Foreach loop

drhooba

New Member
I have a hidden field that gets populated with a javascript array of ID's. When I try to iterate the hidden field(called "hidExhibitsIDs") it gives me an error(in the title).this is my loop:\[code\]foreach(string exhibit in hidExhibitsIDs.Value) { comLinkExhibitToTask.Parameters.AddWithValue("@ExhibitID", exhibit); }\[/code\]when I hover over the .value it says it is "string". But when I change the "string exhibit" to "int exhibit" it works, but gives me an internal error(not important right now).
 
Back
Top