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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0TabModuleSetting & TextEditor controlTabModuleSetting & TextEditor control
Previous
 
Next
New Post
6/21/2008 7:02 PM
 

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'm too poor for anything other than the community version
 
New Post
6/22/2008 10:16 AM
 

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'm too poor for anything other than the community version
 
New Post
6/22/2008 11:21 AM
 

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'm too poor for anything other than the community version
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0TabModuleSetting & TextEditor controlTabModuleSetting & TextEditor control


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