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  |  

AspDotNetStoreFront
  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

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.
SteadyRain
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Associate server-based actions to controls
Previous Previous
 
Next Next
New Post 6/16/2008 5:31 AM
User is offline song
3 posts
10th Ranked


Associate server-based actions to controls 

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 11:00 AM
User is offline Dario Rossa
358 posts
www.dariorossa.it
8th Ranked




Re: Associate server-based actions to controls 

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


Dario RossaDario Rossa
Personal WebSite: http://www.dariorossa.it
DotNetNuke: http://dotnetnuke.dariorossa.it
 
New Post 6/16/2008 5:31 PM
User is offline William Severance
842 posts
www.wesnetdesigns.com
7th Ranked






Re: Associate server-based actions to controls 

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
 
New Post 6/17/2008 7:58 AM
User is offline song
3 posts
10th Ranked


Re: Associate server-based actions to controls 

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 2:33 PM
User is offline Dario Rossa
358 posts
www.dariorossa.it
8th Ranked




Re: Associate server-based actions to controls 

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


Dario RossaDario Rossa
Personal WebSite: http://www.dariorossa.it
DotNetNuke: http://dotnetnuke.dariorossa.it
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Associate server-based actions to controls
 


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.

 


Live Visitor Tracking & Live Chat For DotNetNuke
Track your visitors in real time and add live chat for sales & support. Free Trial.
www.whoson.com
SINA101
WANT A SPECial sIte iN TAIWAN?
sina101.com
Web Development and Strategy Firm
The Risdall Interactive Agency s websites, strategies, branding, & promotion in digital space.
www.Risdall.net/

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