Surround with in aspx deletes selected text when I click Enter.

Category: c# ide

Question

Giorgi Dalakishvili on Mon, 08 Oct 2012 08:54:15


Hello,

When editing aspx files when I select some html snippet and click Ctrl K,S a surround with popup appears. As it has several sections (Asp.Net MVC, Asp.Net MVC 2, HTML) when I click Enter to select the desired one or when I click Enter to select the snippet itself the selected text in the editor is deleted. However clicking Tab does not delete the selected text.

On the other hand it works fine in cs files: Clicking Enter does not delete the selected code.

How can I fix it in the aspx files?

Replies

CoolDadTx on Mon, 08 Oct 2012 15:48:03


I'm not seeing this behavior.  The first step would be to ensure no addins are getting in the way by running in safemode (/safemode).  If the problem still occurs then try the same test only using the mouse.  I'm wondering if you're hitting one to many keys or something.  I'm able to get the surround to work with the mouse or keyboard but the keyboard approach requires that you don't hit the wrong keys.

Michael Taylor - 10/8/2012
http://msmvps.com/blogs/p3net

Giorgi Dalakishvili on Tue, 09 Oct 2012 10:33:02


Running in safemode solved the problem so I will now have to find out which addin is causing this behavior.

CoolDadTx on Tue, 09 Oct 2012 14:35:44


If you have ReSharper or CodeRush then I'd start with them.