I have a Webpart with a "main class" named myClass
public class myClass : Microsoft.SharePoint.WebPartPages.WebPart
and I want to load a ascx file from this class like this
but when I trying to do this:
Control c = Page.LoadControl("~/myAscx.ascx");
Control c = Page.LoadControl("~/nameWebpart/myAscx.ascx");
I only get the message:
"The file myAscx.ascx does not exist"
The file myAscx is in the same "folder" of the myClass. How can I know the correct path?