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
File Conversion
Re: File Conversion
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
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
the rest of ascx code can stay after closing of script tag.
Code: Select all
<%@ Control Language="C#" ClassName="MyCustomControlName" %>
Code: Select all
<%@ Control Language="C#" ClassName="MyCustomControlName" %>
<script runat="server">
</script>
...........
...........
Re: File Conversion
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 ?