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.0AJAX - Nesting Update PanelsAJAX - Nesting Update Panels
Previous
 
Next
New Post
4/30/2007 6:09 PM
 

You are correct, the default behaviour of the core is to use the default UpdateMode for an updatepanel,
which does an update on all present on the page.  This is definitely an oversite and I believe the next version of dnn
will have this property set to conditional.  You can modify the core to do this by adding the following to the AJAX.vb file.

        Private Shared m_UpdatePanelUpdateModeType As Type

        Private Shared Function UpdatePanelUpdateModeType() As Type
            If m_UpdatePanelUpdateModeType Is Nothing Then
                m_UpdatePanelUpdateModeType = Reflection.CreateType("System.Web.UI.UpdatePanelUpdateMode")
            End If
            Return m_UpdatePanelUpdateModeType
        End Function


'Update this method.
        Public Shared Function CreateUpdatePanelControl() As Control
            Dim objCtl As Control = CType(Reflection.CreateInstance(UpdatePanelType), Control)
            Reflection.SetProperty(UpdatePanelType, "UpdateMode", objCtl, New Object() {System.Enum.Parse(UpdatePanelUpdateModeType, "1")})  'Conditional
            Return objCtl
        End Function

 


 
New Post
5/1/2007 10:43 AM
 

Jon,

Thanks for the verification and the solution!  I was leary about modding the core like this on my own, but if this is going to find it's way into a future release I'm much more comfortable with it.

Thanks again,

Glenn

 
New Post
5/1/2007 12:33 PM
 

Just to be clear, are the below statements correct? 

Currently, when I check "Supports Partial Page Rendering" DNN automatically puts in an UpdatePanel that surrounds my module.  So any other UpdatePanel I put into my module is nested within the default DNN UpdatePanel.  This will never change.

That would mean when anything is updated inside the DNN UpdatePanel, any UpdatePanel I put into my module is "nested" and would also be updated.   However, if I try to update my own nested UpdatePanel inside the DNN UpdatePanel, only my one nested UpdatePanel will actually update.

Now if I put in the code for "conditional" partial page updating as supplied above (thank you!), I can update the main DNN UpdatePanel without updating my nested UpdatePanels?

Thanks for the clarification.

 
New Post
5/1/2007 2:14 PM
 

Actually if you do not have the conditional updatemode any update made on any other updatepanel on the page (including your own or other modules) will cause it to update. 

So your statement "However, if I try to update my own nested UpdatePanel inside the DNN UpdatePanel, only my one nested UpdatePanel will actually update"  will only be true with the UpdateMode=conditional.

The last statement where one update panel contains another is not really possible.  If the "outside" updatepanel does a callback, its entire contents may be updated, this would of course include any nested updatepanels.

I would think it a rare occurance to have dnn wrap the entire module in an updatepanel and then have your own panels inside.  If you are going to place 1 or more panels inside, I'd assume that would be all that you would want.

Hopefully this clarifies things a little.


 
New Post
5/1/2007 3:15 PM
 

I'm not sure it is neccessarily a rare occurance; using "Supports Partial Rendering" registers the Script Manager in addition to creating the default Update Panel.  It's not like it's hard to handle the script manager manually in the module, but having the framework do it for you seems like a good idea.  Also, I still think it is counter intuitive to have an AJAX enabled module that requires this setting to be OFF.  Since it can be selected by a super user after deployment, there's really no guarantee that it won't be.  I guess that the opposite of that is true as well - someone could always come along behind you and uncheck the setting, but that should just make everything update the whole page anyway.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0AJAX - Nesting Update PanelsAJAX - Nesting Update Panels


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