akiaz said:
I've tried to duplicate that problem and cannot. Every time I paste or edit, the & stays as an & and never changes to an &. Therefore, my settings must be different from yours that's causing this. I have intellisense turned on, so that can't be causing it.
My options are as follows: I have the 'Pretty Listing' turned off for VB code but that should only affect your code behind pages. I have the 'Apply Automatic Formatting' for HTML/XML turned off for both 'When saving document' and 'When switching from Design to HTML/XML view'. The HTML Specific and XML Specific options are all enabled (checked).
Hopefully that will help, if not then maybe this is something controlled elsewhere?
It's not a hard problem to duplicate so follow this.
Create a new web project with Visual basic.Net Call it the default WebApplication1 or what ever.
Go to the WebForm1.aspx that is created and View it in html format
(Double Click on WebForm1.aspx) On the bottom of the form designer you see two buttons that allow you to switch between Design view and HTML view.
Switch to the HTML view since it default to start up in the Design view.
Add this line:
<link rel=stylesheet type=text/css href='<% Request.ApplicationPath & "/Styles.css" %>' >
Which will link the cascading style sheet to the web page for your usage.
I typically add this line between the <HEAD> and </HEAD> tags.
For example:
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
<!-- I ADDED THE LINE BELOW -->
<link rel=stylesheet type=text/css href='<% Request.ApplicationPath & "/Styles.css" %>' >
</HEAD>
This allows me to use the cascading style sheet.
Now go back go design view for the WebForm1.aspx
Simply drag on a Web Forms Label Control. Or make any modification that causes the form to have that little * appear in the name indicating that the page has been modified.
Now switch back to the HTML view of the page and voila the original line now says
<link rel=stylesheet type=text/css href='<% Request.ApplicationPath & "/Styles.css" %>' \>
Pissing me off... Of course they say better Pissed off than pissed on.