Hi svk,
In you code you set OnClick="NewTemplate_Click", so you need to make sure you have a method name "NewTemplate_Click" on server side(Codebehind).
If you just want the button to execution a javascript method. please change it to OnClientClick="NewTemplate_Click()"
Regards,
ken