locked
Intellisense for HTML elements in Visual Studio 2013 - Is the intellisense sensitive to the element that is being used? RRS feed

  • Question

  • User-1851576699 posted

    When I start an HTML element in Visual Studio and the intellisense pops up all the possible attributes I can use on the HTML element, does the intellisense use any discretion in which attributes it shows are available for assignment on that HTML element or does it just blindly show all possible attributes available for assignment in the HTML 5 language? I am pretty sure it's the latter. I put in an <input /> element in the IDE and it was popping up attributes for web forms like enctype, formaction, and formmethod. 

    Visual Studio 2013 is a pretty great product. Given how mature and professional the software is, it makes me wonder why the intellisense isn't smart enough to hide attributes for HTML elements that cannot even use them. Does anybody know? Has this feature or improvement ever been suggested for a future version of Visual Studio. Surely it can be done.

    *** EDIT ***: To my surprise, the intellisense may be more context aware than I first thought. I didn't realize that enctype, formaction, and formmethod were valid attributes of an input element. I will explore this further as I await more knowledable responses on this matter.

    Sunday, March 9, 2014 12:47 AM

Answers

  • User-166373564 posted

    HI,

    does the intellisense use any discretion in which attributes it shows are available for assignment on that HTML element or does it just blindly show all possible attributes available for assignment in the HTML 5 language? I am pretty sure it's the latter.

    Thanks for sharing your experience here.

    You could post this problem to Visual Studio Uservoice and vote it, this site is for suggestions and ideas, Microsoft will take this into consideration soon.

    Best regards

    Angie Xu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 10, 2014 5:28 AM