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.0Associate server-based actions to controlsAssociate server-based actions to controls
Previous
 
Next
New Post
6/16/2008 7:31 AM
 

Hi,

I'm a total beginner in DNN development (and in .NET framework as well...), and I'm having trouble developing a module in VB.NET .

I started by testing a simple command, and it still wouldn't work...

I associated a Label.Text = Label.Text & " OK" to a button, but it only works if I'm connected to the portal as Host, AND in edition mode...

Does anybody have any idea about how I should do it ?

 

 
New Post
6/16/2008 1:00 PM
 

Hi song,

what behaviour do you experiment  in your module while not logged in? Nothing happens or some error occur? Can you also include the markup and code you are using?

Best regards,
Dario Rossa

 
New Post
6/16/2008 7:31 PM
 

This behavior is most often caused by having set the Cache Duration or Cache Time (in the module's settings) to a non-zero value. When the host/admin or user with edit permissions in edit mode are interacting with a module, caching is disabled - hence the reason it works in that situation.  So, set the module's Cache Duration to 0.  Also, if you set the Default Cache Duration to -1 in the Module Definition, the Cache Duration setting will not appear on the module settings page for any instance of the module and caching will be disabled. This prevents the admin user from accidentally setting the Cache Duration to a non-zero value.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
6/17/2008 9:58 AM
 

Hi,

Thanks for your answers.

I tried setting the caching duration to 0. It stopped the random behavior of the controls (the standard "Menu" control I had put for testing used to have some weird beahvior...), but still does not solve my problem.

And I don't excpect any special function from my module for now, I just want it to perform a simple action.

Here are my markup and my code :

 

<%@ Control Language="VB" AutoEventWireup="true" CodeFile="test.ascx.vb" Inherits="LiveData.Modules.GestionClients.test" Explicit="true"%>
<asp:Button ID="Button1" runat="server" Text="Button" />

<asp:Label ID="Label1" runat="server" Text="Text"></asp:Label>

<asp:Menu ID="Menu1" runat="server">
    <Items>
        <asp:MenuItem Text="test" Value="test">
            <asp:MenuItem Text="test" Value="test"></asp:MenuItem>
        </asp:MenuItem>
    </Items>
</asp:Menu>

 


Imports DotNetNuke
Imports DotNetNuke.Entities.Modules
Imports System.Collections.Generic
Imports System.Reflection
Imports System.Web.UI

Namespace LiveData.Modules.GestionClients
    Partial Class test
        Inherits Entities.Modules.PortalModuleBase

        Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
            Label1.Text = Label1.Text & " OK"
        End Sub

    End Class

End Namespace

 
New Post
6/17/2008 4:33 PM
 

Hi song,

I don't see the button's click event wired up to the sub in there. Try this:

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
  Label1.Text &= " OK"
End Sub

Let me know if this was the problem.

Best regards,
Dario Rossa

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Associate server-based actions to controlsAssociate server-based actions to controls


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