Sarathi, based on your recent update, it's not clear that you need any C# interaction at all. Your appears to be strictly client-side (ie: HTML) with no ASP.NET interaction within it. To call your JavaScript function you'd attach the function call to the onclick attribute of the button tag: