Need to see the controller action and the file names. I am guessing the error is not coming from this view file at all, you may have returned the action to a different cshtml file.