Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 22, 2012 02:38 AM by Sage Gu - MSFT
Aug 13, 2012 12:49 PM|LINK
In Visual Studio 2010, after converting my website to a web application, on many pages, if I double click on an event for a control (for example a button_click) from the designer, the cursor does NOT go to the first line in the function that handles the
event, but to any other apparently random line.
If the function that handles the event is big, I always have to go UP to search where it starts...
I've tried to regenerate the designer.cs file, to cut, recompile, paste the contents of the aspx file, ... nothing worked.
Thanks in advance,
Aug 20, 2012 08:50 AM|LINK
Have you ever tried to reinstall the Visual Studio 2010 or make the convertion on other machine? Please try to create a new empty web application and add some pages to test it. On my side, if it is a web site, the cursor will always focus on the first line
when you click. On the contrary, it will focus on the last code line when it is a web application project.
Aug 20, 2012 10:28 AM|LINK
Hello, Sage Gu.
You are right ! On a new Web application project the focus always goes to the LAST line. In fact this is the same behaviour for my already existing application; The comments were confusing me.
Do you know if there is a way to change this behaviour ? I'd like to tell Visual Studio to set the focus to the first line instead of the last.
I cannot imagine the whyS Microsoft sets this behaviour different from windows Forms and Web sites...
Aug 22, 2012 02:38 AM|LINK
Thanks for your reply. As far as I know, there is not an option can be selected for this behavior in Visual Studio. But we have a special
forum to discuss Visual
Studio and you can post this issue. There are many experts in that field and you may get more help there. Basically, if the line of code snippet over 80, I'd like to encapsulate it as a method. Thus, it is easy to locate. And #region and #endregion block is also