Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

$4.95 Windows Hosting at Webhost4life.com
  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

FCKeditor Project
Salaro -- Skins and more
OnyakTech
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Private Assembly module and ModuleSettingsBase
Previous Previous
 
Next Next
New Post 4/18/2008 6:22 AM
User is offline VidMar
2 posts
10th Ranked


Private Assembly module and ModuleSettingsBase 

Hi.

I am trying to make a private assemby module and I have used the BlankModule guide made by Vladan Strigo. But I can not get a hold of webcontrols inside my user control. Here is an example.

I have a control settings.ascx and settings.ascx.cs, I have added them to my like standard user controls, and then modified them according to the DNN_Startup Kit with the control inheriting from ModuleSettingsBase like this:

namespace PromSys.Modules.ViewPromSysPublishStatic
{
    partial class Settings : ModuleSettingsBase
    {
..............

But then I can not get a reference to my controls on settings.ascx. Like if add a control to mye ascx page like this <asp:TextBox id="myTb"  runa="server" /> then I cannot use this code in my cs page

string myText = myTb.Text;

This vill give me a compile error, saying myTb does not exist.

And if I try

TextBox myNewTb = (TextBox)Page.FindControl("myTb");

It will give me an null Exception.

So how do I use webcontrols at the same time as I use ModuleSettingsBase? Or do I use something else then ModuleSettingsBase?

Best regards
Vidar

 
New Post 4/18/2008 9:00 AM
Online now... Chris Hammond
2958 posts
www.engagesoftware.com
5th Ranked








Re: Private Assembly module and ModuleSettingsBase 

It looks like you're doing it partially correct. If you're creating a PA though, are you using a WAP project in VS2k5? If so, right click on the ASCX file in the project and choose convert to web application (or whatever looks close to that)

That should create a designer file that will store the control information, though sometimes you have to switch to design view and back in the ASCX to get it to update the partial classes.


Chris Hammond
Engage Software
St. Louis, MO
314.966.4000


The leading provider of DotNetNuke skinning, training and custom module development.
Official DotNetNuke® Training Provider
 
New Post 4/18/2008 12:54 PM
User is offline Vidar Markussen
24 posts
10th Ranked


Re: Private Assembly module and ModuleSettingsBase 

Well. Yes I use WAP.

If I change the Inherit statement to Page instead of ModuleSetitngsBase, it works fine, so I think the problem lies with ModuleSettingsBase, or with some reference. If I use the same files inside the DotNetNuke main project (not a PA) then I can access the controls. So there has to be a link missing in my web application project, that is present in the dotnetnuke website.

Best regards
Vidar.

 
New Post 4/20/2008 1:00 AM
User is offline Vidar Markussen
24 posts
10th Ranked


Re: Private Assembly module and ModuleSettingsBase 

Since there does not seem like anyone have an answer to my question, I will throw in a new one.

How do you guys make a PA project in C#? 
Do you use Web Application Project? 
What do you inherit from in the View, and Settings pages?
Do you include other references than dotnetnuke.dll?
Can someone maybe send me a very simple project of a settings.ascx and view.ascx with the codebehind files. If you can, send them to vidar(dot)markussen (a) gmail(dot)com.

Thanks in advance
-Vidar-

 

 
New Post 4/23/2008 4:35 AM
User is offline Ignas
25 posts
10th Ranked


Re: Private Assembly module and ModuleSettingsBase 

Hello, Vidar,

well, personally I am trying to create module from PA at the moment and I use WAP. My module doesn't need settings page, but it has edit.ascx. View and Edit module classes inherits from DotNetNuke.Entities.Modules.PortalModuleBase. I include only DotNetNuke.dll, but that's because I do not need something in addition.

My module loads and I am able to navigate from View to Edit page, but unfortunately some exception occure somewhere in DAL..

I hope this will be usefull to you.

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Private Assembly module and ModuleSettingsBase
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Alliance Systems & Programming Inc
Alliance is not just our name... it's how we do business. We partner with our clients, learning their business processes and standards and then applying our expertise to help them improve their workflow and profitability.
www.Alliancesys.com
Customer Connect
Customer Connect provides cutting edge solutions that deliver sales, marketing and customer service results.
www.customer-connect.com
TechNexxus
Business process and technology sourcing solutions delivering superior people, process and value. We have used, and continue to use, DNN successfully in numerous client projects to deliver exceptional value. We are proud to support the DNN team and community.
www.technexxus.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP