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  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
Verndale
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  TabModuleSetting & TextEditor control
Previous Previous
 
Next Next
New Post 6/21/2008 5:02 PM
User is offline Ryno
294 posts
9th Ranked




TabModuleSetting & TextEditor control 

One thing I've used a lot in my custom modules (which worked great in DNN3 but now I'm having issues with in DNN4) is having a module splash screen in Settings.  I put a DNN TextEditor control in the Module Settings so admin can update it.  The text of the TextEditor is saved in the TabModuleSettings using UpdateTabModuleSetting().  Unfortunately, I cannot get the text of the TextEditor to save now (it always comes up blank).  The other controls (simple textboxes and checkboxes) all work fine using the same method but this Texteditor control text won't save and is always coming up blank.  Here is the relevant code which works for other controls just not this texteditor for some reason.  The module cache is set to 0 by the way.  Thanks greatly if somebody can point out what changed with .NET 2.0 or DNN4 to make this not work anymore...

Settings.ascx

<%@ Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx"%>

<dnn:texteditor id="UnitInfoTemplate" runat="server" Width="100%" Height="300 px"></dnn:texteditor>

Settings.ascx.vb

In the LoadSettings() I have:

If Not IsDBNull(TabModuleSettings("UnitInfo")) Then
   UnitInfoTemplate.Text = CType(TabModuleSettings("UnitInfo"), String)
Else
  UnitInfoTemplate.Text = ""
End If

In the UpdateSettings() I have this line which SHOULD store the text:

objModules.UpdateTabModuleSetting(TabModuleId, "UnitInfo", UnitInfoTemplate.Text.Trim)

 


I use DNN version 4.8.1
 
New Post 6/22/2008 8:16 AM
User is offline Ryno
294 posts
9th Ranked




Re: TabModuleSetting & TextEditor control 

I figured it out.  Instead of using IsDBnull it should use IsNothing:

If Not IsNothing(TabModuleSettings("unitinfotemplate")) Then
   ' Make sure to use NOT ISNOTHING instead of NOT ISDBNULL!
   UnitInfoTemplate.Text = CType(TabModuleSettings("unitinfotemplate"), String)
Else
   UnitInfoTemplate.Text = ""
End If


I use DNN version 4.8.1
 
New Post 6/22/2008 9:21 AM
User is offline Ryno
294 posts
9th Ranked




Re: TabModuleSetting & TextEditor control 

Ok, now that I have the value succesfully being updated in the module Settings.ascx.vb but I am now having a problem pulling the value in the View.ascx.vb portion of the main module.  Did something change with TabModuleSettings?  Now when I try to access the value (which works now in Settings) from the main portion of the module it thinks the value is NOTHING. 

lblUnitInfo.Text = Server.HtmlDecode(CType(Settings("unitinfotemplate"), String))

This line returns "" even though I can see the setting has a value.  This line above is located in a public Sub of my view.ascx.vb file


I use DNN version 4.8.1
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  TabModuleSetting & TextEditor control
 


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.

 


DocuPeak Business Process Management RAD
Comprehensive enterprise and government process management. Forms, documents, indexing, workflow, views, content intelligence, capture, etc. Point and click rapid application development.
www.Webiplex.com
ADefWebserver.com
DotNetNuke® Module Development Help Website
ADefWebserver.com
Get Smarter Mail, SmarterStats, SmarterTickets
Windows mail server, web log analytics, and customer service management software - Free Editions Available!
www.smartertools.com

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