Search

format document command corrupts casing of asp statements by Flapper

Closed
as Fixed Help for as Fixed

1
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Bug
ID: 118314
Opened: 8/24/2005 1:04:13 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
if the "format document" command is issued to tidy up html layouts, the letter casing within asp separators <% and %> is affected as if they are html tags
Details (expand)
Product Language
English
Version
Visual Web Dev 2005 Express Beta 2
Category
HTML Source Editing
Operating System
Windows 2000 Professional
Operating System Language
English
Steps to Reproduce
within an otherwise valid html page add some html/asp code such as

<select class="text" name="WorkPermitType" id="WorkPermitType">
<option value=""></option>
<option value="Yes" <% if cstr(workpermittype) = "Yes" then response.write "selected" end if %>>Yes</option>
<option value="No" <% if cstr(workpermittype) = "No" then response.write "selected" end if %>>No</option>
</select>


then issue a format document command (ctrl+k, ctrl+d)
Actual Results
<select class="text" name="WorkPermitType" id="WorkPermitType">
<option value=""></option>
<option value="Yes" <% if cstr(workpermittype) = "yes" then response.write "selected" end if %>>Yes</option>
<option value="No" <% if cstr(workpermittype) = "no" then response.write "selected" end if %>>No</option>
</select>


noting that the "Yes" and "No" within the if statements have been lower cased to be "yes" and "no".
Expected Results
I would expect the casing of the values to remain consistent to the original code (subject to the clients indentation rules for html layout).
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 8/24/2005 at 11:26 PM
Thank you for your feedback. We are investigating this issue.

Thank you, VS2005 Product Team
Posted by Microsoft on 8/26/2005 at 10:14 AM
This has been fixed.
Posted by Microsoft on 8/26/2005 at 10:46 AM
This has been fixed.
Posted by Microsoft on 8/29/2005 at 10:30 AM
Although we admit there is a issue with our HTML parser which in this case [correctly] perceives <% %> block as an attribure name, it does not take into account that it is server-side block and per XHTML rules lowercases it. The workaround is to not generate minimized attributes. Per XHTML the attrbute must look like selected="selected" or the attribute should be missing when value is not selected.

Thanks
Web Platform and Tools team.
Posted by Microsoft on 11/29/2005 at 5:59 PM
This issue has been reactivated as we begin planning for the next version of Visual Studio and the .NET Framework. Over the coming months we will reconsider feedback that was previously postponed. We welcome your comments and participation in this process. See http://blogs.msdn.com/productfeedback/archive/2005/10/21/483563.aspx for more information.

- The Developer Division
Posted by Microsoft on 12/21/2005 at 5:50 PM
Thanks for submitting the bug. The issue has been fixed in future releases.

Thanks,
Web Platform & Tools Team
Posted by Microsoft on 1/17/2007 at 2:02 AM
Thank you for submitting this issue. The bug has been resolved Fixed, and its resolution shipped as part of Visual Studio 2005 Service Pack 1 (SP1).

You can download SP1 at http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx. If installing SP1 does not resolve the issue for you, please reactivate.

Thanks again for your feedback!
-Scott Currie
-DDTFA Program Manager