✅ 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
Angius9mo ago
Judging by .cshtml, you're not using Blazor, but rather MVC or Razor Pages So the answer is no Use Javascript
Thing from Human Resources
i can use Blazor as well im just trying to test stuff what is the blazor way to do it
Angius
Angius9mo ago
If you use Blazor then yes, you can
Thing from Human Resources
will it run client side
Angius
Angius9mo ago
Blazor WASM will, yes
Thing 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
x0rld9mo ago
you can do it server side with blazor
Thing from Human Resources
SCgetoutofmyhead a request that must happen on client
Pobiega
Pobiega9mo ago
you can't run C# code on the client outside of blazor WASM or blazor hybrid
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
Thing from Human Resources
I got it to SCCUTE
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX9mo ago
Use the /close command to mark a forum thread as answered
Want results from more Discord servers?
Add your server