The way you have added attribute is correct. But you are expecting it to be a sever side method, which is not the case. The attribute
'onclick'
has been added at the client side; which means
get()
should be a javascript method.
It would look something like this:
<script>
function get()
{
}
</script>