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.0Any advice on this would be welcomed plzAny advice on this would be welcomed plz
Previous
 
Next
New Post
9/20/2009 8:39 PM
 

 So I developed another little module, 

This module does not have any reading or writing to the database, its very simple.  28 user controls one main control , 26 other controls one for each letter in the alphabet.  

The main user control as seen on this page >> http://www.r8yourpolitician.co.uk/SearchPoliticians/tabid/1464/Default.aspx 

On that page at the bottom is a placeholder, when a user clicks the corresponding letter A-Z as you would expect it would display the relevant user control in the placeholder.  

So I have the main user control and I have 27 other user controls A- Z and ALL which are displayed in the main usercontrol within the placeholder. 

The module works fine only if your logged in.

When your not logged in you will see the main user control but when you click on any letters the other user controls will not show in the placeholder.  

I had a look at the permissions on the module and it is set appropriately, anyone got any ideas on why the sub user controls will not display to all users. 

thanks

P

 
New Post
9/20/2009 8:56 PM
Accepted Answer 

Only when logged in, or only when logged in as administrator? Either way, I'd check the cache time and make sure it's 0. Or change the module definition so the default cache time is -1.

That's all I can think of off the top of my head.

 
New Post
9/20/2009 9:01 PM
 

 To add to the above, i just logged in as a normal user and the module does not show at all.  

So it only shows the main control when your not logged and it only behaves as normal when the Admin or Host is logged in. 

Here is the method that takes a string of the name of the control. It then adds it to the placeholder called "phModule" 

 

 

        Public Sub A(ByVal fname As String)


            Try

                'phModule.Controls.Clear()


                'Response.Redirect(Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "a", "mid=" & ModuleId.ToString()))

                Dim DynamicPage As String = ""

                Dim Con As String = "/controls/"


                DynamicPage = DotNetNuke.Common.ResolveUrl(Me.TemplateSourceDirectory & Con & fname)


                Dim objModule As Entities.Modules.PortalModuleBase = CType(Me.LoadControl(DynamicPage), DotNetNuke.Entities.Modules.PortalModuleBase)


                If Not objModule Is Nothing Then


                    objModule.ModuleConfiguration = Me.ModuleConfiguration

                    phModule.Controls.Add(objModule)


                End If

            Catch ex As Exception


            End Try



        End Sub

method is called like this

        Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
            A("a.ascx")
        End Sub

        Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
            A("b.ascx")

        End Sub


 
New Post
9/20/2009 9:07 PM
 

Thanks for that, as soon as i set the cache time to 0 it sorted it, 

Now it works as it should even for non registered users.  Thanks now I can move on to some other stuff. 

 

Baatezu wrote

Only when logged in, or only when logged in as administrator? Either way, I'd check the cache time and make sure it's 0. Or change the module definition so the default cache time is -1.

That's all I can think of off the top of my head.

 
New Post
9/21/2009 12:49 AM
 

 Glad that helped. That's one of the many bits of information that I've picked up from just reading the forums.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Any advice on this would be welcomed plzAny advice on this would be welcomed plz


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