Visual Studio Environment intellisence offers duplicate tags. Are they the same? - visual-studio-2010

when editing an aspx page in visual studio the intellisence offers auto insertion of the usual asp:tags, but it also offers some tags that are not prefixed with asp: and not regular html. For instance, it offers an updatepanel tag, loginview tag and an image tag. Are these some sort of short-hand for adding asp.net web controls?

I have tested this and it doesn't do anything. After adding the tag visual studio's intellisence doesn't suggest any attributes and it doesn't render any sort of output to the client. Still not sure why intellisence suggest them, but they aren't server controls.

Related

Is there a feature in VIsual Studio or Resharper that can extract XAML into a separate file?

In ASP.NET Forms and MVC, you can select a block of code and extract it into a separate user control or file using Resharper and possibly Visual Studio. I cannot find such a feature for XAML. Does it exist in either Resharper or Visual Studio? If so, how do you perform this action?
I think you are looking for this:
https://www.jetbrains.com/help/resharper/ReSharper_by_Language__XAML__Refactorings.html
Resharper allows you to extract styles and resources, but you have to select the XAML and go to Resharper->Refactor->Extract in order to find the options, you won't see them if you use ALT+ENTER.

Sharing custom HTML elements among team members

In the question: Create custom html control in toolbox Visual Studio 2012, the OP gets an answer about creating a custom HTML control in the toolbox of Visual Studio. I want to do the same thing and then share that with team members. We are all pulling projects from the same TFS Repository, so I would like to use that if possible. I hope to achieve something on the level of sharing newly added abbreviations to the team for Intellisense. I would prefer to not require an install or adding an extension, and especially not creating a DLL that must be referenced or added to the toolbox manually. Just something that adds these custom HTML controls to the toolbox, with maybe a "Get Latest".

How to add custom HTML Tags to Visual Studio and Avoid Squiggly Lines

I'm using Visual Studio 2013 to create raw HTML pages (i.e. index.html).
In my HTML I am implementing custom HTML tags. As such, Visual Studio underlines my custom tags with squiggly lines (due to the warning of "Unknown element ...").
In hopes to get rid of the squigglies, I added my custom tags to the list of "Tag Specific Options" via Tools > Options > Text Editor > HTML (Web Forms) > Formatting > Tag Specific Options. However, the squiggly lines persist.
Is there a way to inform VS2013 that my custom HTML tags are valid (i.e. keep VS2013 from underlining my custom tags with squigglies)?
Visual Studio 2013 Update 4 removes the validation in .html files, but not in .aspx files.
Support for custom elements, polymer-elements and attributes
We no longer validate unknown attributers for custom elements as there
will be many custom made tags in different frameworks. So there will
no longer be squiggles under the unknown elements.
— Announcing new Web Features in Visual Studio 2013 Update 4 RC
Download Visual Studio 2013 Update 4.
Validation is only removed in the HTML editor, not the HTML (Web Forms) editor. This means that, by default, .html files will not have custom element validation, but .aspx pages will. If, like me, you don't think this makes sense, show your support by voting for custom elements in .aspx files.
Hmm... what are you trying to accomplish? Keep in mind that if you could somehow make visual studio ignore the unknown element, that's no guarantee browsers looking at your page will be able to translate the element too.
Are your pages HTML5? if so you've got a shot at making it work. but you'll have to define it in client code. Here is source.
But most browsers don't support it yet! look at here elements.
In the case of making Visual Studio recognise the tags you could take this approach:
1) Go to: Tools > Options > Text Editor > HTML (Web Forms) > Formatting
2) Press "Tag Specific Options"
3) Select "Client HTML Tags" in the new window's treeview
4) Press "New Tag" below the treeview to add a new tag

Is there a way of extracting a selection into a partial or another view either in VS 2013 Editor or Resharper?

Is there a way of selecting HTML or razor code in the VS Editor and extract it into a separate view file?
Visual Studio 2013 already has a similar feature in WebForms where code selection can be extracted into a UserControl. Also, RubyMine, Resharper's sister product, has a "Extract Partial View" feature that extracts code into a separate view file.
I'd wager that such a feature exists in either product, but I haven't been able to find it. Does it exist?
https://youtrack.jetbrains.com/issue/RSRP-263354
Doesn't look like it will be possible any time soon unfortunately

Shortcuts for web controls and HTML snippets in Visual Studio

Consider the feature in Visual Studio 2010 for snippets in the HTML Source view of a web page.
type a control name in plaintext with no markup or brackets!
... e.g. hyperlink.
Then hit Tab
Your web control has been auto-completed for you. It's up to you to fill in the other details that you need.
This works for form as well:
<form action="default.aspx" method="post">
</form>
This looks like a real time saver. This is supported in WebForms and ASP.NET MVC projects.
What other snippets are available in Visual Studio 2010 in the Source view of a page?
For the authoritative list of snippets, check out the VS2010 installation folders where the snippets are stored:
C:\Program Files\Microsoft Visual Studio 10.0\Web\Snippets\HTML\1033
There is one folder for ASP.NET and one for plain HTML snippets.
Also, if you use jQuery a lot, there is a set of jQuery snippets that you can add to Visual Studio as well.
Here are a ton (100's) of the short cuts in Visual Studio right from MSDN:
http://msdn.microsoft.com/en-us/library/da5kh0wa.aspx
The one thing that has been around forever but a lot of people forget about is block selection done by holding down the ALT key and use the mouse to select a block of text. Great when you want to copy/cut/delete a bunch of code that is lined up but you don't want the whole line.
Yeah, this is a really cool new set of snippets in VS2010. Here are the articles I used to learn it:
Walkthrough: Using HTML
Snippets
Using HTML Code Snippets in Visual
Studio 2010

Resources