umair mohsin

umair mohsin

  • 1.3k
  • 387
  • 64.5k

An item with the same key has already been added

Mar 16 2019 2:19 PM
Hi friends, subject will tell you my error in mvc application. I am making an app in which only login users can apply for job, my scenario is an unauthentic user can see job details but when apply for the job he/she will be directed to log in page and then choose some details about current salary,expected salary or resume etc from the same page and that selected values with job id should posted back to the relevant [httppost] action.i am using Viewmodels in this app.i hope the scenario is so clear to all.
 
my application is directing me to the login page if the user is not logged in and after successful login i am redirecting to the same job details page. but when i choose some details from the same page(These details are the dynamic fields defined in the same VM of course, these will render in If(user.identity.isauthenticated block)).the form is not posting to the relevant action and default error page occurs which says "The item with the same key has already been added".can someone help me in solving this issue.i have done much googling.please help me

Answers (2)