Tip#66: Did you know… how to insert quotes values automatically while typing the attrib values?


It’s a nice time saver if you would like the HTML editor to automatically add quotes for the attribute values while you are typing.

To set this option select Tools->Options. Check Show all settings. From the left pane select Text Editor -> HTML -> Format and check the insert attribute value quotes when typing checkbox.

 

image

 

Now as soon as you hit “=” for the attrib value, editor will insert a pair of quotes and show the intellisense for the values accepted.

Select a value from the intellisense and press enter/tab. Cursor would jump out of the pair of quotes (you will have to hit the arrow key after entering the attrib value, if it doesn’t show up a list of values).

 

image

 

Deepak Verma
SDET | Visual Web Developer

Comments (21)

  1. What's New says:

    It's a nice time saver if you would like the HTML editor to automatically add quotes for the attribute

  2. Thank you for submitting this cool story – Trackback from DotNetShoutout

  3. Jason Haley says:

    Interesting Finds: May 30, 2009

  4. Chandan says:

    Thanks for the tip, it saves valuable time, really!

  5. Jean Yu says:

    Stupid Microsoft.  It should be default setting.

  6. Miu Golladay says:

    I agree with Jean.  It should be default setting. Thanks Jean.

  7. Here is the latest in my link-listing series .  Also check out my ASP.NET Tips, Tricks and Tutorials

  8. Here is the latest in my link-listing series .  Also check out my ASP.NET Tips, Tricks and Tutorials

  9. Some good stuff: (Thanks Scott) May 30th Links: ASP.NET, AJAX, ASP.NET MVC, Visual Studio Here is the

  10. Hi,

    Its a nice tweak.

    Thanks,

    Thani

  11. Pooya says:

    I recently was thinking about this. Great find!

  12. anup hosur says:

    nice article.. we can save time a lot..

  13. 【原文地址】 May 30th Links: ASP.NET, AJAX, ASP.NET MVC, Visual Studio 【原文发表日期】 Saturday, May 30, 2009 3:39

  14. PetterLiu says:

    如果你愿意在HTMLEditor中输入属性值时自动加入双引号。设置选项菜单Tools-

  15. Kwyjibo says:

    Thank you for posting this! I kept saying to myself…there HAS to be a way to make it put the quotes in automatically. I honestly have no idea why this isn’t turned on by default.

  16. Вот последняя статья из моей серии списка ссылок . Также обратитесь к моим страничкам Советы, секреты

  17. Kelps says:

    I use this setting since VS2005. I always wondered why isn’t this the default setting?

  18. This is a great feature except there is a VS bug (that I have reported on MS Connect but has since been closed as non-repro) that has been plaguing me for years across 4 different dev boxes where this setting mysteriously defaults to disabled!

  19. Rejan says:

    This should have been a default setting. Nevertheless, a good time saver. Thanks for sharing.

  20. akshay says:

    Thanks.. it is helpfull for me…