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.
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.
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...
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
helpful.
rogerts
Member
35 Points
21 Posts
Double click on an event does not go to the first line of the function that handles the event
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,
Roger
aspx designer
Sage Gu - MS...
Contributor
6693 Points
578 Posts
Microsoft
Re: Double click on an event does not go to the first line of the function that handles the event
Aug 20, 2012 08:50 AM|LINK
Hi rogerts,
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.
Regards,
Sage
aspx designer
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework
rogerts
Member
35 Points
21 Posts
Re: Double click on an event does not go to the first line of the function that handles the event
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...
Best regards,
Roger
aspx designer
Sage Gu - MS...
Contributor
6693 Points
578 Posts
Microsoft
Re: Double click on an event does not go to the first line of the function that handles the event
Aug 22, 2012 02:38 AM|LINK
Hi rogerts,
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 helpful.
Regards,
Sage
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework