SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to load a user control like in a regular web part but in a mobile web part.

The regular method of doing it:

private const string _ascxPath = @"~/_CONTROLTEMPLATES/WP7.SP.MobileWebPart/MobileWebPart/MobileWebPartUserControl.ascx";

protected override void CreateChildControls()
    Control control = Page.LoadControl(_ascxPath);

How do I do it in a mobile web part?

share|improve this question
Welcome to SharePoint Stack Exchange! A well written question encourages people to answer it. Please read our guidelines which I've used to improve your post. You can also read How to Ask for more general guidelines. – Alex Angas Aug 1 '11 at 8:56

I don't have experience with mobile development myself, but recently some mobile labs were released: . It looks like that you already took some code from that lab, but I would suggest you to follow the lab completely: you will learn about mobile adapters, then.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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