I\'ll be debugging a site in Visual Studio 2010 and editing an *.aspx
or *.ascx
file, and without warning, it will lock up so that I can\'t edit it
Have you and your collegue got Microsoft Office 2007 or 2010 installed? Run the Office setup from CP > Programs & Features and do a Repair. Reboot afterwards, or at least log out.
I'd understand if you don't want to do a full reinstall of Office, but if the repair doesn't fix this, I would suggest it.
I've found a temporary workaround-solution: Right-click on the file and select "Open with...". Now select "Source Code (Text) Editor" and you can edit the file again but without IntelliSense :-( But you won't need an external editor.
Nevertheless we still have to wait for Microsoft to find a better solution.
I was just having the same problem. When the code page disappers, I click debug->restart. It restarts the debugging process, and show all the pages I had open.
I experienced the same issue, and found out that for me it occurred only in .aspx
pages with an "eval"
statement (used for databinding within e.g. a gridview) within <a>
tags. As soon as I removed the "eval"
statements, the pages became editable again while debugging.
Example of code causing the page to be readonly while debugging:
<a href='<%# Eval("URL") %>' target="_blank"
title='<%# Eval("URL", "Open url: {0}") %>'><b>'<%# Eval("Text") %>'</b></a>
Example of replacement code causing the page to be editable again while debugging:
<asp:HyperLink NavigateUrl='<%# Bind("URL") %>' runat="server" ID="hlURL" Target="_blank"
ToolTip='<%# Bind("URL", "Open url: {0}") %>' Text='<%# Bind("Text") %>' Font-Bold="true" />
Usually this is because of your version control system making the files readonly (namely VSS). Go into the settings for source control and set the editor so that it will checkout files when edited.
If it is not your source control, then it is that the files are being made readonly by something, and that 'something' is what you need to find to fix this problem.
Had the same problem with VS2010. R-click on the ASPX file and select the XML EDITOR -- then editing is enabled.