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 DemoApp issuesAjax DemoApp issues
Previous
 
Next
New Post
1/13/2008 1:06 PM
 

Hi all,

I have followed the tutorial for creating an Ajax module and for the most part it seems to work except that the CollapsiblePanelExtender section. I'm not sure what I did wrong but could someone please help.

What happens is that when I click to collapse the panel it does collapse but expands again.

I have the code in an ascx file called "DemoControl.ascx" and then added this module to a page I created in the portal. I'm not sure if the problem is caused by the ajax code or the created page, if the page is finishing to reloading/refresh after the module fires then it could be resetting the module to orginal state if that is the case what would I do to fix it? I placed the code to the module below incase someone wants to review it to see if they can replicate this problem.

The DNN version is 4.08

Thanks inadvance.
Neil

DemoControl.ascx
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="DemoControl.ascx.vb" Inherits="DesktopModules_DemoApp_DemoControl" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Panel ID="PnlAjaxUpdate" runat="server" Height="50px" Width="300px">
    Current time:
    <asp:Label ID="lblCurrentTime" runat="server" Text="Label"></asp:Label><br />
    <br />
    <asp:Button ID="btnTimeUpdate" runat="server" Text="Update (Ajax)" />
    <asp:Button ID="btnPostBackTimeUpdate" runat="server" Text="Update (Postback)" /></asp:Panel>
Collapsible Panel Demonstration<br />
<br />
<ajaxToolkit:CollapsiblePanelExtender ID="PanelExtender" runat="server"
    TargetControlID="pnlCollapse"
    CollapsedText="Click to Expand"
    ExpandedText="Click to Colapse"
    TextLabelID="lblAction"
    CollapseControlID="pnlHeader"
    ExpandControlID="pnlHeader">
</ajaxToolkit:CollapsiblePanelExtender>

    <asp:Panel ID="pnlHeader" runat="server" Height="50px" Width="125px">
        <asp:Label ID="lblAction" runat="server" Text="Label"></asp:Label>
    </asp:Panel>
   
    <asp:Panel ID="pnlCollapse" runat="server" Height="50px" Width="125px">
        <p>content inside this panel can be expanded or collapsed by using the CollapsiblePanelExtender.</p>
        <p>Additional text can be added as well as any other HTML or</p>
        <p>This is the last paragraph.</p>
    </asp:Panel>

 DemoControl.ascx.vb
Imports DotNetNuke
Imports System.Web.UI
Imports System.Collections.Generic
Imports System.Reflection
Imports DotNetNuke.Security.PortalSecurity

Partial Class DesktopModules_DemoApp_DemoControl
    Inherits DotNetNuke.Entities.Modules.PortalModuleBase


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If DotNetNuke.Framework.AJAX.IsInstalled Then
            DotNetNuke.Framework.AJAX.RegisterScriptManager()
            DotNetNuke.Framework.AJAX.WrapUpdatePanelControl(Me.PnlAjaxUpdate, True)
            DotNetNuke.Framework.AJAX.RegisterPostBackControl(Me.btnPostBackTimeUpdate)
        End If
    End Sub

    Protected Sub btnPostBackTimeUpdate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPostBackTimeUpdate.Click
        Threading.Thread.Sleep("5000")
        lblCurrentTime.Text = System.DateTime.Now.ToString()

    End Sub

    Protected Sub btnTimeUpdate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnTimeUpdate.Click
        Threading.Thread.Sleep("5000")
        lblCurrentTime.Text = System.DateTime.Now.ToString()

    End Sub
End Class

 
New Post
1/15/2008 3:39 AM
 

I think you need to change the DOCTYPE of your Page , see topic about www.dotnetnuke.com/Community/Forums/tabid/795/forumid/111/threadid/171866/scope/posts/Default.aspx

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Ajax DemoApp issuesAjax DemoApp issues


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