Why is the code behind not hit?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 anos atrás
How is it possible that the code behind file from HomePageProducts.ascx is not hit, when debugging the default.aspx in VS??
13 anos atrás
I had the same problem but when I start debugging with the current tab on a .aspx file, it works fine.
13 anos atrás
This does not work for me.

When I mark out the DATABIND in the Page_Load there is not even a change in the output!

What am I overlooking?

Has anyone any idea?
13 anos atrás
Fabianus wrote:
This does not work for me.

When I mark out the DATABIND in the Page_Load there is not even a change in the output!

What am I overlooking?

Has anyone any idea?


1.Where is the breakpoint - in which file?
2.Do you load default.aspx in browser - if so are there really any products on home page?
13 anos atrás
LevGe wrote:
Fabianus wrote:
This does not work for me.

When I mark out the DATABIND in the Page_Load there is not even a change in the output!

What am I overlooking?

Has anyone any idea?


1.Where is the breakpoint - in which file?
2.Do you load default.aspx in browser - if so are there really any products on home page?


Hi LevGe,


Thanks for helping;

1. The breakpoint is in HomePageProducts.asxc.cs, the user control is registered and than instantiated (by default in version  1.60)
2. Yes, I load the default.asp in the browser - it is the default page of the VS-website. What I see are the 4 products, that come with nopCommerce by default.

When I remove the instance of the HomePageProducts from the default.aspx.cs, the products are gone, so I must be in the right file..

I don't get it!
13 anos atrás
OK, solved for now: In VS under Tools ->Options ('show all settings') -> Debug -> General I have deselected the option for 'Require source file to exactly match the original version'.

Now I can step through the .cs-code when debugging.

Strange that this option should be changed from the default value!

Thanks for you help.
13 anos atrás
For source and symbol file unmatch issue, please use the following steps to troubleshoot:

1. In Debug mode, open menu Debug / Windows / Modules

2. In the module list, find the module you are debugging and check the following:

a. Is the module path correct? Make sure it is not pointing to wrong one.

b. Is symbol loaded? If loaded, is the symbol path correct?

c. Check the time stamp, is it the time you perform the build?

d. Check the source code file's time stamp in windows explorer. Is it modified after the build time?

3. If the symbol is not loaded correctly, right click on the module and select Symbol Load Information. Check why the symbol is not located at the search paths.

Hope it helps. Thanks.

http://social.msdn.microsoft.com/Forums/en/vsdebug/thread/a9d600f7-9216-4f99-abac-7140ec831f24

Whilst this is not a completely related anwser, the procedures are sound and relevant, so thought i would share.
13 anos atrás
Thanks for sharing!
13 anos atrás
Welcome, hopefully it helps someone one day.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.