Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...PortalModuleBase and  System.Web.UI.MobileControls.MobileUserControl  in UserControl. how?PortalModuleBase and System.Web.UI.MobileControls.MobileUserControl in UserControl. how?
Previous
 
Next
New Post
11/15/2010 9:14 AM
 
Hi There,

As you all probably know the usercontrol (ascx) is inherting from "DotNetNuke.Entities.Modules.PortalModuleBase" class.  

I would like to write module/page for Mobile access etc. I've found you can use (inhert)

"System.Web.UI.MobileControls.MobileUserControl" class. I would like to use the mobile functions in my page.

But I don't know how to get workaround this since you can only inherit 1 Class in .NET.

I've created an inferface and defined portalmodule base as property and inherti the MobileUsercontrol and Implement the Interface.

but I get error:  object reference not set  ect. etc. 

Can someone please advice how I can use System.Web.UI.MobileControls.MobileUserControl in my usercontrol?


thanks,
 
New Post
11/15/2010 1:27 PM
 
Mesut Demir wrote:
As you all probably know the usercontrol (ascx) is inherting from "DotNetNuke.Entities.Modules.PortalModuleBase" class.  

 This is not required any more since DNN5. It is sufficient that your control implements (not inherits) DotNetNuke.UI.Modules.IModuleControl

 
New Post
11/16/2010 4:06 AM
 
Hi Stefan,

thank you for tip. I googled and find this Dotnetnuke Wiki information
http://local.dotnetnuke.com/Community...

I inherit the MobileUserControl and Implement the IModuleControl Interface.  When I read the page above (dotnetnuke wiki) ControlPath+ControlName+LocalResourceFile properties are clear.

but I'm struggling with the other 2 properties : Control + ModuleContext. 

Could you please advice the approach, how can I fix this ?   I mean I want definitly inherit from MobileUserControl....

Maybe a peace of code will help...

thanks for the tips and advices,

mesut




namespace ABC.CustomModules.Mobile_Mainpage

{

partial class ViewMobile_Mainpage : System.Web.UI.MobileControls.MobileUserControl, DotNetNuke.UI.Modules.IModuleControl
{

#region IModuleControl Members

public new Control Control

{

get { throw new NotImplementedException(); }

}

public string ControlName

{

get { throw new NotImplementedException(); }

}

public string ControlPath

{

get { throw new NotImplementedException(); }

}

public string LocalResourceFile

{

get

{

throw new NotImplementedException();

}

set

{

throw new NotImplementedException();

}

}

public ModuleInstanceContext ModuleContext

{

get { throw new NotImplementedException(); }

}

#endregion

}

}

 
New Post
11/16/2010 9:39 AM
 
A good example for an implementation of the IModuleControl Interface is  PortalModulBase
 
New Post
11/18/2010 3:23 AM
 
Hi Stefan,

thank you very much... This is great...  I got it tecnnically compile well now.

When I implement the "DotNetNuke.UI.Modules.IModuleControl" and inherit from "

System.Web.UI.MobileControls.MobileUserControl" and run my app it says


Since DNN only works with (*ASCX) Usercontorl, I don't know how to taclke this....
MobileControl must be contained within a MobilePage: ASP.default_aspx


Anyway.... at least I learnt the Imodulecontrol....

thanks for you help,

mesut
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...PortalModuleBase and  System.Web.UI.MobileControls.MobileUserControl  in UserControl. how?PortalModuleBase and System.Web.UI.MobileControls.MobileUserControl in UserControl. how?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out