ASP.NET Markup Go To Definition and Snippets

I don’t know if this is something new in VS or if it’s because I have the power tools installed, but I just realized that I can pick “Go to Definition” on an asp.net object in my code behind, like a label, or an asp.net checkbox, and instead of taking me to the vb definition of the control, it takes me to the place where the object is defined in the ASPX markup.   

And, in vs2010 if you auto complete with pressing tab 2 times when adding aspx markup items it will auto complete the entire element, not just the little bit you are typing.

 

So for example, if you type “<asp:But” and press tab you get:

 

<asp:Button

 

But if you tab again you get:

 

<asp:Button Text=”text” runat=”server” />

 

There are snippets included that are named things like “textbox” and “button”, so if you type “<bu” or “<hyp” and hit tab 2 times you get:

<asp:Button Text="text" runat="server" />

Or

<asp:HyperLink NavigateUrl="navigateurl" runat="server" />

 

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s