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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Can not run properly when we use guest accountCan not run properly when we use guest account
Previous
 
Next
New Post
5/15/2007 3:05 AM
 

I create a simple module which has a button. When user clicks it, it generates an event linking to other .ascx file in the same module. It can be in the same page or different page.

Dim objModules As ExModuleController = New ExModuleController
Response.Redirect(NavigateURL(58, "MyEx", "mid=392&giatri=1"))

 

If I log in as a host, everything is fine. However, if I log out and run as a guest, it doesn't work as I want. Sometime it runs but almost does nothing. How can I fix it? Please help me.

 
New Post
5/16/2007 12:35 PM
 

Do you receive any error messages?

Is the control you are trying to go to available for all users?

Do you have caching turned off for the module?


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
5/16/2007 9:24 PM
 

I put this module in 2 differrent page. The first page is the child of Home page. The second page has no parent. The module in the second page runs fine while module in the first page can not run.

 

I have debugged and found that it doesn't fire the buttons' click events in module in the first page. I don't know why. Here is the code:

 

 protected void Button1_Click(object sender, EventArgs e)
        {

            DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
            Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(59));

        }

        protected void Button2_Click(object sender, EventArgs e)
        {

            DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
            Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "controlCS", "mid="+ModuleId));
        }

        protected void Button3_Click(object sender, EventArgs e)
        {

            DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
            Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(59, "controlCS", "mid=394" ));
        }

        protected void Button4_Click(object sender, EventArgs e)
        {

            DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
            Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(59,"", "giatri=2"));

        }

        protected void Button5_Click(object sender, EventArgs e)
        {
            DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
            Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(59, "controlCS", "mid=394&giatri=2"));

        }

 

<%@ Control language="C#" Inherits="YourCompany.Modules.MyModuleCS.ViewMyModuleCS" CodeFile="ViewMyModuleCS.ascx.cs" AutoEventWireup="true"%>
<%@ Register TagPrefix="dnn" TagName="Audit" Src="~/controls/ModuleAuditControl.ascx" %>
&nbsp;<asp:datalist id="lstContent" datakeyfield="ItemID" runat="server" cellpadding="4" OnItemDataBound="lstContent_ItemDataBound">
  <itemtemplate>
    <table cellpadding="4" width="100%">
      <tr>
        <td valign="top" width="100%" align="left">
          <asp:HyperLink ID="HyperLink1" NavigateUrl='<%# EditUrl("ItemID",((int)DataBinder.Eval(Container.DataItem,"ItemID")).ToString()) %>' Visible="<%# IsEditable %>" runat="server"><asp:Image ID="Image1" Runat=server ImageUrl="~/images/edit.gif" AlternateText="Edit" Visible="<%# IsEditable%>" resourcekey="Edit"/></asp:hyperlink>
          <asp:Label ID="lblContent" runat="server" CssClass="Normal"/>
        </td>
      </tr>
    </table>
  </itemtemplate>
</asp:datalist>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button1" />
<asp:Button ID="Button2" runat="server" Text="Button2" Width="79px" OnClick="Button2_Click" />
<asp:Button ID="Button3" runat="server" Text="Button3" OnClick="Button3_Click" />
<asp:Button ID="Button4" runat="server" Text="Button4" OnClick="Button4_Click" />
<asp:Button ID="Button5" runat="server" Text="Button5" OnClick="Button5_Click" />
<asp:Button ID="Button6" runat="server" Text="Button6" OnClick="Button6_Click" />
<asp:Button ID="Button7" runat="server" Text="Button7" OnClick="Button7_Click" /><br />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

 
New Post
5/16/2007 9:34 PM
 

I think I know the reason. I have changed cache setting to 0. And it works. However, the question is why it happens like this. I don't understand the cache time can affect to my module like this. There is several buttons and that's all.

 
New Post
5/17/2007 10:19 AM
 

The cache time setting for a module can only be set to 0 if there is static content for the module.  If you have events that are triggered you cannot use it.  I believe of the core modules the text/html module is the only one that actually uses the cache setting.


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Can not run properly when we use guest accountCan not run properly when we use guest account


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