I have a VBScript function in my ASP.net Page I have a small test function as shown below
<script type="text/vbscript">
sub testmePlease()
msgbox("Hello World")
end sub
</script>
I have a button in my webform and I am calling the function onclientclick as shown below
<asp:Button ID="btnAccept" runat="server" Text="Accept Settlement" OnClientClick="testmePlease()"/>
For some reason I get this end of statement expected javascipt error. What can be wrong??
I’m assuming you’re using IE. Once Internet Explorer finds first
<script>tag in your page, it assumes it’s language as default.Try this:
And change your button to:
Everything else should run ok.