Workaround for VBScript “Invalid Character” error in ASP.NET 2.0

A block of VBScript in ASP.NET page works fine to print barcode  in ASP.NET 1.1, but the code generates  "Invalid Character" error when upgraded to ASP.NET 2.0. By adding an extra empty javascript block before the vbscript block can get rid of this error.

<head runat="server">
    <title>MyPage</title> <script type="text/javascript"></script>

    <script type="text/vbscript">……</script>

This tip was found from this thread:

Thanks, Benson Yu, for sharing.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s