I do something like this in Asp.net under c#
<script type="text/javascript" runat="server">
function hi()
{}
</script>
Even the keyword "function" is not recogonized.But when I do the same using VB.net it's working fine. I am using Visual Studio 2012 Ultimate.