Unable to Edit code behind

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
dmurphy4
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 30
Joined: Wed Sep 26, 2012 1:47 pm
Location: Wichita, Kansas USA

Unable to Edit code behind

Post by dmurphy4 » Thu May 30, 2013 1:27 pm

I'm mostly a front - end developer and can't seem to understand why any changes to the code behind in my conlib will have no affect.

- I created a copy of the ProductImage conlib and renamed it "AACustomProductImage.ascx"
- I changed the CodeBehind reference at the top of the .ascx file to reference "AACustomProductImage.ascx.cs"
- Any changes to EITHER the AACustomProductImage.ascx.cs or the ProductImage.ascx.cs have no affect on the AACustomProductImage.ascx file. I even tried deleting all the content in both these files and still, nothing changes - no errors.

Any suggestions? I'm sure it's something obvious but I running out of ideas.

Using Gold
Daniel Murphy
Web Developer - Front End
http://StearnsFlotation.com, http://MadDogGear.com, http://Aerobed.com, http://Sevylor.com
Wichita, Kansas

User avatar
Naveed
Rear Admiral (RADM)
Rear Admiral (RADM)
Posts: 611
Joined: Thu Apr 03, 2008 4:48 am

Re: Unable to Edit code behind

Post by Naveed » Thu May 30, 2013 9:32 pm

You should also rename the class in both files and rebuild the page/project for changes to take effect.

Inside the AACustomProductImage.ascx.cs file rename the class:

Code: Select all

public partial class AACustomProductImage: System.Web.UI.UserControl
Inside the AACustomProductImage.ascx file update the Control inherits attribute in first line to match the class name.

AbleCommerce recommends to create your custom ConLib controls inside a "Custom" sub-folder under ConLib. If you move your control inside the Custom sub-folder, update the namespace as required. This is just a suggestion, not a requirement.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Unable to Edit code behind

Post by jmestep » Fri May 31, 2013 3:02 am

If you are working on the WAP version, the changes won't take effect until you compile the solution. If you are using the WSP version, the changes will take effect with no additional steps required. We do our sites using the WSP version for this reason, even though we have all the tools (like Visual Studio) required for the WAP version. Here is some info on the differences:
http://help.ablecommerce.com/faqs/ablec ... d_wap_.htm
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
dmurphy4
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 30
Joined: Wed Sep 26, 2012 1:47 pm
Location: Wichita, Kansas USA

Re: Unable to Edit code behind

Post by dmurphy4 » Mon Jun 10, 2013 8:18 am

I was able to convert from WAP to WSP and code behind works fine now. I had problems compiling the site. Probably because I started buiding the project as a Web Site and Not opening as a web application.

The below topic was helpful in converting the site to WSP. Thanks jmstep!
viewtopic.php?f=65&t=16831
Daniel Murphy
Web Developer - Front End
http://StearnsFlotation.com, http://MadDogGear.com, http://Aerobed.com, http://Sevylor.com
Wichita, Kansas

Post Reply