✅ is there a way to add a C# event handler to .cshtml button

title says it all. i want a button that changes the text of a <p> element when pressed
13 Replies
Angius
Angius11mo ago
Judging by .cshtml, you're not using Blazor, but rather MVC or Razor Pages So the answer is no Use Javascript
The Fog from Human Resources
i can use Blazor as well im just trying to test stuff what is the blazor way to do it
Angius
Angius11mo ago
If you use Blazor then yes, you can
The Fog from Human Resources
will it run client side
Angius
Angius11mo ago
Blazor WASM will, yes
The Fog from Human Resources
bet cause i want to make smth small with a library that cant be used on most servers im getting some "Operation not supported on this platform"
x0rld 👻 🎃
x0rld 👻 🎃11mo ago
you can do it server side with blazor
The Fog from Human Resources
SCgetoutofmyhead a request that must happen on client
Pobiega
Pobiega11mo ago
you can't run C# code on the client outside of blazor WASM or blazor hybrid
Unknown User
Unknown User11mo ago
Message Not Public
Sign In & Join Server To View
The Fog from Human Resources
I got it to SCCUTE
Unknown User
Unknown User11mo ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX11mo ago
Use the /close command to mark a forum thread as answered
Want results from more Discord servers?
Add your server