
Unexpected "foreach" keyword after "@" character.
Unexpected "foreach" keyword after "@" character. Once inside code, you do not need to prefix constructs like "foreach" with "@".


Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Laxmidhar SahooRank #383 · 6.6K reputationPosted Oct 31, 2018, 12:09 AM EDT
Sreekanth ReddyRank #726 · 3.2K reputationPosted Oct 30, 2018, 11:25 PM EDT
Gaurav RajRank #2,919 · 493 reputationPosted Oct 30, 2018, 11:32 PM EDT
hi
The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[SNetMvc.Models.Home2Procedure_Result]', but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable`1[SNetMvc.Models.CommanModel]'.
Laxmidhar SahooRank #383 · 6.6K reputationPosted Oct 30, 2018, 11:56 PM EDT
Gaurav RajRank #2,919 · 493 reputationPosted Oct 31, 2018, 12:03 AM EDT
{
public IEnumerable
public Home2Procedure_Result home1 { get; set; }
public IEnumerable
}
Gaurav RajRank #2,919 · 493 reputationPosted Oct 31, 2018, 12:27 AM EDT
Laxmidhar Sahoo
I have two model homeprocedure and commentprocedure .. How can i return in one view