I want to have both Login form and Register form on the same page, I tried like this:
@model Project.Models.LoginModel
@model Project.Models.RegisterModel
// Login form
...
// Register form
...
…but I can only have one model reference at the top of the View. I tried with partial views for both forms, but then the functionality was lost.
Any ideas on how to get this right? Thanks!
you can use only one model in a view, create your viewModel class
and import it in your view