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...Double PostbacksDouble Postbacks
Previous
 
Next
New Post
1/29/2009 12:10 PM
 

Hi,

I am getting page post backs twice for some unknown reason. I can replicate this issue too, if you first create a new DNN installation and then put a HTML/Textbox on it and change the cache time from 1200 to 0. Then if you run DNN in debug (ctrl f5) and put a breakpoint on the HTML module page load you will see a page posting back once. If now you add another module like the user control you will see the page load break point hit twice. Does anyone know why DNN would be doing this?

 

Thanks in advance

 
New Post
1/30/2009 3:08 AM
 

i am having the same problem with 4.9 version...

i build my module that to make a view count of a page. Every time click a link to the page, it will count +2. There is one thing abit fun... if you login at the same page, the page load once that my count only +1. (i already use "not ispostback" to restrict the count only for fresh loading.)

would it be the problem of dotnetnuke authenication bug to make double page load? i mean probably check user authenication do the first load and then reload the page.

=( i wanna know if anyone can make view count not more than 1 for every fresh load, Thank you very much

 
New Post
1/30/2009 3:39 AM
 

Here just the code i run when page load:

the page count is storing in a userprofile that to count how many times the user visited this page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Try
            If DotNetNuke.Framework.AJAX.IsInstalled Then
                DotNetNuke.Framework.AJAX.RegisterScriptManager()
            End If
           
            If Not IsPostBack Then
                If Not IsUser AndAlso Request.IsAuthenticated Then
                   
                    UpdateViewCount()
                   
                End If
            End If
          
        Catch ex As Exception
           
            ProcessModuleLoadException(Me, ex)
        End Try
    End Sub

    Private Sub UpdateViewCount()
        Try
            Dim intViews As Integer = 0
            Dim strViews As String = String.Empty
           
            strViews = UserInfo.Profile.GetPropertyValue("ViewCount")
            If Not String.IsNullOrEmpty(strViews) Then
                intViews = CType(strViews, Integer)
            End If
            intViews = intViews + 1
          
            UserInfo.Profile.SetProfileProperty("ViewCount", intViews)
            UserController.UpdateUser(PortalId, UserInfo)
           
        Catch ex As Exception
            ProcessModuleLoadException(Me, ex)
        End Try
    End Sub

i am using vb to do the code behind.

 
New Post
1/30/2009 7:34 AM
 

The problem with just checking the ispostback is sometimes when we are trying to bind a reapeater, it needs to go through the bind again. Hopefully is someone knows somthing about this it could halve the time of the page load.

 

 
New Post
2/1/2009 8:42 PM
 

hmm... as my test here, i find that may be a problem for double page load when there are more than 1 AJAX modules in the same page... i got 3 ajax modules in the same page. i keep testing when i took out one by one, when there is only one AJAX module in the page, the view count become correct.

However, when i put back one more AJAX module, it become double page load again.

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Double PostbacksDouble Postbacks


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