Click here to Skip to main content
15,748,559 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am following MVC 3 music store tutorial for MVC in MVC4 and have gotten stuck . Everything went well until I came in the stage where I used the Sampledata.cs from MVCmusicstore-Assets and made some changes in Global.ascx.cs as instructed in the tutorial. Now the error appears in SampleData.cs which says:

"cannot implicitly convert type 'string' to 'int' "and "Operator '==' cannot be applied to operands of type 'int' and 'string'"

With my lack of experience in MVC, I could not figure out where I made some simple and blunder mistake or there is something to be taken care of while doing mvc3 projects tutorial in mvc4.

I look forward for your reply.
Nimit Joshi 7-Apr-14 0:24am    
can you post your code?

1 solution

Share this answer
[no name] 14-Apr-14 13:41pm    
These errors seem to be common mistakes during coding, not related to MVC3/4.
Are you following MusicStore app in MSDN!! If so that would work out fine. Check for issues in your code base i.e. check for general casting errors

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900