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>
</head>

This tip was found from this thread: http://forums.asp.net/t/1149127.aspx

Thanks, Benson Yu, for sharing.

Advertisements


Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s