I'm trying to call a user control (.ascx) in a client web part that I've created, knowing that I need to do that in a provider hosted app. Can someone give me a helpful tutorial please? What should I make in the client web part to call the page.ascx ?

1 Answer 1


Yes. First you should register the ascx file in the Markup of your webpart

<%@ Register Src="~/_controltemplates/15/Folder/Page.ascx" TagPrefix="uc1" TagName="PageAscx" %>

Then add the control using

<uc1:PageAscx runat="server" id="PageUC1" />
  • thanks Hashim ,but should I put both of this lines in the my webpart.aspx ??
    – N.Sahraoui
    Commented Apr 17, 2015 at 14:25
  • Yes. Both line goes into your web part markup Commented Apr 17, 2015 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.