This is very handy and quick time saving features and a much required during code refactoring. Consider a situation where you have designed some web pages which are quite large or you have realized that it would have been better to put some part of web page in a user control so that you can use it in multiple places. Yes, manually this is a big process to create controls, copy – past code and refer them in page.
Well, VS 2011 Developer preview makes this very easier. In source of HTML Editor you will have option called “Extract to User Control” . Select the code block in HTML Editor which you want to move as user control and select “Extract to User Control” from context menu.
This will launch “Save As” dialog for user control. Provide the “User Control Name” and click “Ok”
This will automatically create a User Control and same will be referred to your page automatically.
Interesting ? Well, you can check out few more interesting addition over here Few Nice features in Visual Studio 11 Developer Preview for ASP.NET Developers
Hope this helps !
Cheers !
Abhijit