If you declared it in the code behind class, you'll need to post back to the server. http is a disconnected protocol. Once the browser received the html from the server, the network connection is disconnected and stays that way until the browser initiates another request.