HTML problems while migrating from VS2003 to VS2005

Hi, all. I tried to get the existing code for my website (originally
built on .NET 1.1 using VS2003 as the development tool) to compile
within VS2005 for .NET 2.0, but have run into the following problem :

The existing code uses include files (i.e. files that are included
in .aspx pages using the include macro) that contain inline VB
scripting code (for example,  <%=myvariable%> or <% if  IsValidFlag =
true then %> ) : The error message is "Character '<' , hexadecimal
value 0x3c is illegal in an XML attribute values.

If I remove the offending include file, then I cannot compile it
either because it says it's missing the include file. Also, I have
already set the HTML validation in Tools->Action to HTML 4.01 and
uncheck the "Show Errors" box.

There are other errors complaining about the inline code such as :

"Expecting '>'"

"Character '%', hexadecimal value 0x25 is illegal in an XML attribute
values"

"Entity 'nbsp' not defined"

(The error message above is complaining about the "&nbsp;" in the
include file.

How do I resolve this problem? Does VS2005 support inline scripting
like this or does it only support inline code that is within the
<script> block? Do I need to restructure the whole site using Master
Pages? Should I rewrite the code so that it doesn't contain inline
scripting code?

Thanks in advance for answering.

  -Andrew

0
ndrw_cheung
8/10/2007 9:36:53 PM
asp.net.migrate-vs2003-vs2005 590 articles. 0 followers. Follow

1 Replies
690 Views

Similar Articles

[PageSpeed] 56
Get it on Google Play
Get it on Apple App Store

short answer - Try just converting the VBScript code to pure VB.Net and see how it does
<%# myVariable %>, with variables being assigned in Page_Load, followed by a Page.DataBind -  use helper functions for the inline logic
or - remove the reference in the page to the include file - - 

long answer - rewrite with a MasterPage scenario (best choice)


David Wier
MCP/ASPInsider
ASPNet101.com - where to look first!
Control Grouper - easily control properties for multiple controls with one control!
Calendar Express - The Best HTML Calendar Generator on the web!
(Please 'Mark as Answer' when it applies)
0
augustwind
8/10/2007 9:44:04 PM
Reply: