Changes I make to .cs files not showing up.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
I've been having recurring problem of not being able to get my changes to .cs files to appear.  On the OneVariant.ascx user control I have added a new tab.  Inside that tab I created a literal, like this...

            <ajaxToolkit:TabPanel runat="server" ID="pnlBatteryInfo" HeaderText="Battery Information">
                <ContentTemplate>
                    <div style="padding: 0px 5px 0px 5px;">
                        <asp:Literal ID="lBatteryInfo" runat="server" Text="Testing" />
                    </div>
                </ContentTemplate>
            </ajaxToolkit:TabPanel>

This appears just fine on the page when it is loaded.  The literal says "Testing" as it should.  Now, to the .cs file I have added a line of code to modify the content of that literal in the BindProductInfo function...

lBatteryInfo.Text = "Blah Blah Blah";

The data in the literal remains "Testing".  I have even tried replacing the line of code...

lFullDescription.Text = product.FullDescription;

with

lFullDescription.Text = "testing";

To see if that have any effect on the full description, but it does not.  The full description from the database continues to be shown.

This problem is occuring on ALL .cs files that I try.  I cannot modify code.  I tried to add a button to an aspx page with a click function in the .cs file and the page would error saying the function, which I just created, didn't exist in the .cs file.  This type of issue has not occurred before.  Is there a setting in Visual Studio that I need to change?  I'm using Visual Studio 2008 9.0.30729.1.  As you can imagine, this is very frustrating.
13 years ago
Hello,

Two things you need to make sure.

1) whenever you make any changes in any .cs file, you have to re-build your project.

2) which version of nopCommerce you are using ? if you're using 1.7 or 1.8 version then it requires Visual Studio 2010 as both versions are based on 4.0 framework and Visual Studio 2008 doesn't support 4.0. But if you're using 1.6 or earlier version of nopCommerce then you can use Visual Studio 2008.
13 years ago
Hi Mike,
I tried to rebuild my project several times to no avail.  I made the change, then rebuilt the project and then I hit F5 to start debugging to review my changes.  Is this the proper work flow?

Also, I'm using 1.5 so using 2008 should not be an issue.
13 years ago
try one thing

1) clean your solution

2) Build your solution (not re-build)

3) close your solution

4) now open your solution again and try running your project now and see if it's working fine or not
13 years ago
I went to the Build menu and the "clean" option was not available.  I realized I opened the project as a website instead of opening the solution.  So, I closed everything down and reopened the project.  I cleaned the solution, then built the solution and now I'm getting errors.  I am getting errors telling me that a drop down list I have on an ascx page does not exist when I reference it in the code behind file, but it does.
13 years ago
Just to let you know this is the right way of building your website, you gotta use a solution file, so in future do not open it as a website , open the solution.

if you're sure and double checked that drop down menu is there on the page and you are sure that the code that you added in .cs file is CORRECT, then close your solution and open it again and run the project (event if you see any warning etc on the window below - just run your project).
13 years ago
That's the badger.  Everything is working now.  Thanks for all your help, Mike.
13 years ago
your welcome, nice to know that everything is working fine now...
13 years ago
Hello All

I am new to this system. I am using version 1.6.

I changed HomePageProducts.ascx.cs to show the product price. But any changes to .cs is not showing in the home page.

I have rebuild the project and also opening the the solution as project and not as website as it is advised here, but no luck yet.

Please help incase you have got any

Thank you
Arunima
13 years ago
Hello All

Sorry for my earlier post. It was my mistake.....I made the system as website and not as project

It is working now.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.