What is your C# method doing? Generally, your C# code will all run on the server side, whereas HTML5 is associated with the client side.
If you want to use C# instead of JavaScript on the client side, you will need to use a cross-compiler, like
SharpKit[
^].
Imaging a calculator app that runs completely in the browser. C# is cross-compiled to JavaScript to provide the logic to make calulations when you press buttons.
If you want the client side to invoke a C# method on the server, you will need to put your C# code on a web site (ASPX or MVC) or behind a web service (REST, Web Service, WCF), then navigate to that page, or load it asynchronously with AJAX.
Image the calculator app, but no logic is done in the browser; each time you press + - / * = etc., a call is made to a server and the result is returned.