Here, you are using pure HTML control, not ASP.NET control (which could work on the server part, with postback). In your case, you do nothing to call
btn_onclick
on server side, so you need
btn_onclick
to be a Javascript function. Define it accordingly in your HTML or external file, forget about C# function. Or, if you really want to invoke some .NET method from your Javascript handler of the button click, you can send an HTTP request using Ajax:
http://en.wikipedia.org/wiki/Ajax_%28programming%29[
^],
http://en.wikipedia.org/wiki/List_of_Ajax_frameworks[
^],
https://api.jquery.com/jQuery.ajax[
^].
Alternatively, you can use ASP.NET
Button
control:
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/standard/button.aspx[
^].
The question suggests that you have no idea on how Web works, especially ASP.NET. Please start here:
http://www.asp.net/get-started[
^].
Yes, from the very beginning. And I'm not really sure it would be a beginning for you. Are you confident with .NET? If so, I'm not sure you understand the Web mechanisms, what happens on server and client parts. Perhaps you would need also this:
http://en.wikipedia.org/wiki/HTTP[
^],
http://en.wikipedia.org/wiki/WWW[
^],
http://en.wikipedia.org/wiki/WorldWideWeb[
^].
—SA