Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vs2010 - shortcut for surrounding a String by double quotes

I used to work with a developer who, selects a text in aspx page and applies a keyboard shortcut to enclose it in double quotes.

Eg: runat=server. when i select server and press ctrl+somekey, it should be runat="server"

Could someone tell me what is the keyboard shortcut, i tried googling a lot, but couldnt find one..

Currently we are overhauling a page, and need this badly...

Thanks in advance.

like image 573
Raghav Avatar asked Aug 12 '11 08:08

Raghav


1 Answers

As far as I know this is a setting in Visual Studio which enables you to immediatelly place quotes when you type attribute and press equals sign or if you type a few letter and press CTRL+Space. This will autocomplete the attribute and place quotes. In order to enable the quotes click on Tools then Options. If it is not checked, check Show all settings. Expand Text Editor, then HTML and click on Formatting. On the right side enable Insert attribute values quote when typing and Insert attribute value quotes when formatting

like image 169
Husein Roncevic Avatar answered Oct 03 '22 03:10

Husein Roncevic