C
C#11mo ago
jacks

blazor app need help passing parameter into method call

hi
No description
12 Replies
jacks
jacksOP11mo ago
No description
jacks
jacksOP11mo ago
ok so basically display each song and have a button that can delete that song i just don't know how to put the current song into the method call ☹️ or if there would be a better way to do this i'm open to anything
Anu6is
Anu6is11mo ago
Just call the method with the parameter like you normally would
jacks
jacksOP11mo ago
you can't in blazor i thik theres special syntax but idk it
jacks
jacksOP11mo ago
No description
Anu6is
Anu6is11mo ago
@(() => RemoveSong(song))
jacks
jacksOP11mo ago
No description
Anu6is
Anu6is11mo ago
what does your code look like?
jacks
jacksOP11mo ago
i tried a bunch of differnt combinations with that and none of them worked
jacks
jacksOP11mo ago
No description
No description
No description
SinFluxx
SinFluxx11mo ago
@onclick="@(() => RemoveSong(song))"
jacks
jacksOP11mo ago
tysm

Did you find this page helpful?