File Conversion

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
ZPCAC
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 40
Joined: Wed Apr 16, 2014 11:08 am

File Conversion

Post by ZPCAC » Mon Nov 02, 2015 10:11 am

Hello -

I am trying to convert my .ascx.cs to .ascx and i am unsure of how to do so.

Some direction would be appreciated.

Thanks

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: File Conversion

Post by mazhar » Mon Nov 02, 2015 10:23 am

If you don't want codebehind file then what you need is to edit your ascx file and update its first line to look something like this

Code: Select all

<%@ Control Language="C#" ClassName="MyCustomControlName" %>
then copy the functions from .ascx.cs file and put them into acx file right after the page directive mentioned in above code wrapped in script tags like

Code: Select all

<%@ Control Language="C#" ClassName="MyCustomControlName" %>
<script runat="server">
   
</script>

...........
...........
the rest of ascx code can stay after closing of script tag.

ZPCAC
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 40
Joined: Wed Apr 16, 2014 11:08 am

Re: File Conversion

Post by ZPCAC » Mon Nov 02, 2015 11:13 am

Okay currently I have a .ascx.cs and a .ascx file. If I make changes to one do I have to edit or resave the other ?

Post Reply