# VB code run from Button click event

**URL:** <https://forum.radzen.com/t/vb-code-run-from-button-click-event/724>\
**Category:** Angular\
**Created:** [December 3, 2018, 8:20pm UTC](https://forum.radzen.com/t/vb-code-run-from-button-click-event/724 "2018-12-03T20:20:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Willems](https://forum.radzen.com/user_avatar/forum.radzen.com/john_willems/32/1298_2.png) [@John\_Willems](https://forum.radzen.com/u/John_Willems)\
**Post date:** [December 3, 2018, 8:20pm UTC](https://forum.radzen.com/t/vb-code-run-from-button-click-event/724/1 "2018-12-03T20:20:46Z")

</div>

Can I run a [vb.net](http://vb.net) sub (code) from a Button click event? I would like to create a code handling routine in VB ( my language of choice) and have the click event fire it. It seems to want javascript code not VB. I know I have asked this before but the settings are not clear.

Also which file will I need to add the actual code to. If there is a reference to how this is done please let know.

Thanks

John W

---

<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:** [December 3, 2018, 8:31pm UTC](https://forum.radzen.com/t/vb-code-run-from-button-click-event/724/2 "2018-12-03T20:31:22Z")

</div>

Indeed invoking VB code from an Angular application isn't directly possible. Angular runs in the browser whereas the .NET runs server-side. This is why has to use an HTTP request to invoke server-side code. We have a tutorial [here](https://www.radzen.com/documentation/custom-controller/) which shows the required steps.

In the future when Microsoft ships officially Blazor (and adds VB support to it) one would be able to invoke C# or VB code directly from a button click in Radzen.

---

<div class="post-metadata">

**Author:** ![John\_Willems](https://forum.radzen.com/user_avatar/forum.radzen.com/john_willems/32/1298_2.png) [@John\_Willems](https://forum.radzen.com/u/John_Willems)\
**Post date:** [December 3, 2018, 8:42pm UTC](https://forum.radzen.com/t/vb-code-run-from-button-click-event/724/3 "2018-12-03T20:42:55Z")

</div>

Thanks I will work with that. I understand Core 3 will support VB.
