# How to use Login Component

**URL:** <https://forum.radzen.com/t/how-to-use-login-component/13579>\
**Category:** Radzen.Blazor Components\
**Created:** [March 25, 2023, 4:11pm UTC](https://forum.radzen.com/t/how-to-use-login-component/13579 "2023-03-25T16:11:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndyFraser](https://forum.radzen.com/letter_avatar_proxy/v4/letter/a/a183cd/32.png) [@AndyFraser](https://forum.radzen.com/u/AndyFraser)\
**Post date:** [March 25, 2023, 4:11pm UTC](https://forum.radzen.com/t/how-to-use-login-component/13579/1 "2023-03-25T16:11:27Z")

</div>

I am new to the Radzen Blazor components and want to use the Login component however, it is unclear how I bind the username and password to my view model. The example on the website only shows markup not the code-behind. Can someone point me in the right direction?

Andy

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [March 25, 2023, 4:19pm UTC](https://forum.radzen.com/t/how-to-use-login-component/13579/2 "2023-03-25T16:19:10Z")

</div>

Hi @AndyFraser,

You can see the complete source of every online demo by clicking the "Edit Source" button.  
 ![login](https://forum.radzen.com/uploads/default/original/2X/6/6baa4cb1e6f025f722127f3f2eac71ba75c18883.gif)

---

<div class="post-metadata">

**Author:** ![AndyFraser](https://forum.radzen.com/letter_avatar_proxy/v4/letter/a/a183cd/32.png) [@AndyFraser](https://forum.radzen.com/u/AndyFraser)\
**Post date:** [March 26, 2023, 6:34pm UTC](https://forum.radzen.com/t/how-to-use-login-component/13579/3 "2023-03-26T18:34:34Z")

</div>

@korchev Thank you very much - I missed the Edit Source ☹

Andy

---

<div class="post-metadata">

**Author:** ![Gibson\_Ujah](https://forum.radzen.com/user_avatar/forum.radzen.com/gibson_ujah/32/19617_2.png) [@Gibson\_Ujah](https://forum.radzen.com/u/Gibson_Ujah)\
**Post date:** [October 10, 2024, 7:08pm UTC](https://forum.radzen.com/t/how-to-use-login-component/13579/4 "2024-10-10T19:08:00Z")

</div>

I tried using the Radzen login component and after binding the data and clicking on submit it still did nothing

---

<div class="post-metadata">

**Author:** ![mumfie](https://forum.radzen.com/letter_avatar_proxy/v4/letter/m/b4bc9f/32.png) [@mumfie](https://forum.radzen.com/u/mumfie)\
**Post date:** [October 11, 2024, 6:19pm UTC](https://forum.radzen.com/t/how-to-use-login-component/13579/5 "2024-10-11T18:19:53Z")

</div>

You can debug your code by checking if the **AccountController.cs** post method **Login** is being called.

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [October 12, 2024, 6:12am UTC](https://forum.radzen.com/t/how-to-use-login-component/13579/6 "2024-10-12T06:12:39Z")

</div>

What did you expect to happen on submit? RadzenLogin either posts to a specified location or fires its Login event as shown in the demo: [Blazor Login | Free UI Components by Radzen](https://blazor.radzen.com/login)
