RadzenLogin-Simplelogin

Hi , I am very new to Radzen components. I use Visual Studio 2022 and installed Radzen through the nuget packages. I am trying to use RazdenLogin(simplelogin). Once the user clicks on Login button it should take me to the controller class to check the entered username and password against the database values and if success take me to another page. I would like to know how to achieve this.

Thanks in advance.

Hi @Laks ,
You can check this link which includes a link to the github source code

Hi Thanks for your prompt response. Please not I am using visual studio and not Radzen Blazor Studio. I would like to know if it will be a similar approach or something different?

Thanks

The github code refered to above demonstrates how the login page calls the login POST method on the account controller.

Thanks for this. I can invoke a controller method now, but it goes into infinite loop.
Any help would be much appreciated.
Thanks

Any infinite loop isn't caused by the Radzen.Blazor component library. I suggest debugging your application.

I have a login page, once the user enters the username and password,a controller method is invoked, if the details entered are correct, I have added a RedirectToAction which redirects to another controller method, if the username and password is wrong, I have added return RedirectWithError("Invalid user or password", "/") which should redirect to the login page with the error message. I tried debugging the and these both Redirect methods go into infinite loop and never comes out of it.
Thanks

Why do you need to call RedirectToAction if credentials are wrong?
The code above already handles that case.
If the signInManager returns result.succedeed the login you are using might not have permission for that particular page so the login screen gets displayed again.

Mine is a web application with custom login page, where several users will be using the application with a generic username and password. If the entered login details are wrong, I have to notify the user. If it is success the user should be able to go to the next page.
Thanks