I'm using umbraco 7.4.3 and I have used the login and registration built-in partial views , and I' have add the to my site successfully , but I want to know how can I redirect the login page after login successfully to some other page in the website say to ProducsList ? may if any body knows tell me how can I do that please.
I have created a new partial view from the developer section , then selected the registration view from the dropdown list(built-in templates) , after that I have created a document type, and template from the settings section, then I have added the partial view in that template (to be used as a user control) and then related that template to the document type which created for the registration. finally I have created a node under the website uses the registration template and document type. then I run the URL for that page and I have created a new users and they added correctly to the back-end members. the same steps I have followed with the login.
about my previous question may you give details how can I redirect after successful login or registration to some other page please.
You can setup settings in the partial view, look to the source code:
var registerModel = Members.CreateRegistrationModel();
@*
Configurable here:
registerModel.RedirectUrl - Optional. What path to redirect to if registration is successful.
By default the member will be redirected to the current umbraco page
unless this is specified.
registerModel.UsernameIsEmail - the default is true
if you want the username to be different from the email
address, set this to true and add a new Username field in
the form below
@Html.LabelFor(m => registerModel.Username)
@Html.TextBoxFor(m => registerModel.Username)
@Html.ValidationMessageFor(m => registerModel.Username)
*@
Login partial view
Hello all ,
I'm using umbraco 7.4.3 and I have used the login and registration built-in partial views , and I' have add the to my site successfully , but I want to know how can I redirect the login page after login successfully to some other page in the website say to ProducsList ? may if any body knows tell me how can I do that please.
regards
Mostafa
Hi Mostafa,
Welcome to Our forum!
Can you share how do you hadle login form requests?
Do you have some API or Surface controller?
You can add redirect to that controller.
Thanks,
Alex
Hi Alex ,
I have created a new partial view from the developer section , then selected the registration view from the dropdown list(built-in templates) , after that I have created a document type, and template from the settings section, then I have added the partial view in that template (to be used as a user control) and then related that template to the document type which created for the registration. finally I have created a node under the website uses the registration template and document type. then I run the URL for that page and I have created a new users and they added correctly to the back-end members. the same steps I have followed with the login.
about my previous question may you give details how can I redirect after successful login or registration to some other page please.
regards Mostafa
Mostafa,
Did you write logic of creating member in the partial view?
Can you provide the code?
Usually redirecting isn't complex issue, we need to know to which page or which pagetype should we redirect.
Thanks
Thanks Alex
about your question, I didn't write down any code for creating the members, I just used the registration template in the umbraco partial-views .
regards
Mostafa,
You can setup settings in the partial view, look to the source code:
var registerModel = Members.CreateRegistrationModel();
You have to add code like:
Best,
Alex
many thanks Alex :)
best regards
Mostafa, you are welcome, can you mark this topic as solved? It will help other developers to find solution :)
THanks,
Oleksandr
Hi Mostafa,
Besides Alex's answers, maybe you will also like the posts about adding member login/registration/... functionality that can be found at:
and
is working on a reply...