Maybe you've got some confusion about that =)
public sub ex()
, - is a server side code, while
is a client side frameworks...
If you want to run some server side logic from a client side, i strongly advise to you look into