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.0Custom module only works when logged in as adminCustom module only works when logged in as admin
Previous
 
Next
New Post
11/20/2006 12:43 PM
 

I apologize if this is currently in the forums, but the search kept timing out on me.

I am just starting to develop my own modules.  I have built a very simple module with a link button and a panel.  I simply want the link button to make the panel visible when clicked.  I have added it to my site; however, the code behind for the link button only gets hit when logged in as host or admin.  If I am logged in as a regular user or not logged in, the link button does not work. 

Right now the code is very simple.  I am just trying to get something basic that I can build on.  The code is below.  If you need additional information, please ask.  I appreciate any help that you can give.

aspx:
<asp:LinkButton ID="lnkAddCategory" runat="server">Add New Category</asp:LinkButton>

<asp:Panel ID="pnlNewCategory" runat="server" Visible="false">
    <asp:TextBox ID="txtAddCategory" runat="server" Columns="40"></asp:TextBox><br />
    <asp:Button ID="btnAddCategory" runat="server" Text="Add" />
</asp:Panel>

code behind:
Protected Sub lnkAddCategory_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkAddCategory.Click
 pnlNewCategory.Visible = True
End Sub

 
New Post
11/21/2006 2:50 AM
 
Hi,
  I have similar problem.
  I have a simple button. The click event sets its text to a text with current time. When I am not logged, the click is handled after one minute - that means that I compile the app, then clicking on the button does nothing and after one minute is elapsed the click is handled and text is set to current time. Then another clicking does nothing until next minute is elapsed.
  Another problem is that the breakpoint in click handler is hit only once in a minute.
  I don't know what mechanism does this but it makes me mad.
  Can anyone help me?

           Thanks a lot

                Karel
 
New Post
11/21/2006 8:39 AM
 

hi ,

you have to put if this statment notice that this code in DNN3.4.5

If UserInfo.IsSuperUser Or UserInfo.IsInRole("Administrators") Then

'''' add your code here .

End If

 

 
New Post
11/21/2006 9:14 AM
 

Also check your cache settings.  You may want to adjust your module/page cache settings.  When logged in as admin/host, these settings are ignored.

 

 
New Post
11/21/2006 9:18 AM
 

Thanks for your replies.  However, I don't think the if then statment will work.  I want it to work for everyone.  Shouldn't having the code without checking user role make it available?

I also don't think it is cache because all other controls work fine.  Another guy in the office is having the same problem with a module that he is working on.  There has got to be a setting somewhere preventing these from working.

Thanks again.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Custom module only works when logged in as adminCustom module only works when logged in as admin


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