I have a Login form, It asks for UserName, Password, TokenID (Each user knows his token, they get it to access an API). I would like to be able to Obtain that Token API that they entered and Pass it on to /Home/Index. What is the best way to go about doing that?
Share
Ok, first you have a View where user will be entering
UserName,PasswordandTokenIdso let the view have a model like the one shown below.and from the view you can return this model, which will hold all these values.
Now as you need to pass these values to
Home/Indexyou can have your form submitted to theIndexaction.But incase if you want to submit a form to a different action of say a controller ‘Login’ and then pass this values to a different controller, you can do something like this.
there are more ways to pass values between two action, see this link