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 - UpdateProgress not displayingAJAX - UpdateProgress not displaying
Previous
 
Next
New Post
7/28/2008 8:22 AM
 

Running DNN 4.8.4 and developing with Visual Studio 2005

I can not get my module to display the UpdateProgress control.  I see the control in the VS Studio designer but nothing appears when I run the module.  I made sure the button event is in the UpdatePanel and added a 5 second wait. 

Also. when I click the button, the screen "flashes", page blanks out and then redraws.  I traced in the debugger and see the Page_Load event is a partial page update.

 


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If (Page.IsPostBack) Then Exit Sub   <<<<<<  Exit occurs on UpdatePanel button click

 

 

 

Here are partial source extracts:

 

1) File mtmc.ascx

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>


  <asp:UpdatePanel ID="UpdatePanel3" UpdateMode="Conditional" runat="server">
    <ContentTemplate>
        <asp:GridView ID="gv1" runat="server">
        </asp:GridView>
        <br />
        <asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="Button" /><br />
        <br />
        <asp:UpdateProgress ID="UpdateProgress3"  AssociatedUpdatePanelID="UpdatePanel3" runat="server">
            <ProgressTemplate>
                Loading ...
            </ProgressTemplate>
        </asp:UpdateProgress>
        <br />
    </ContentTemplate>
</asp:UpdatePanel>

 

2) Code behind mtmc.ascx.vb

Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs)

        System.Threading.Thread.Sleep(5000)
        Call popGV()

    End Sub

    Private Sub popGV()

        Me.gv1.DataSource = Nothing


        Dim myDataTable As DataTable = New DataTable("AdditionalCodes")

        Dim myDataColumn As DataColumn
        Dim myDataRow As DataRow

        myDataColumn = New DataColumn
        myDataColumn.DataType = System.Type.GetType("System.String")
        myDataColumn.ColumnName = "hours"
        myDataColumn.Caption = "Hours"
        myDataColumn.Unique = False
        myDataTable.Columns.Add(myDataColumn)

        myDataColumn = New DataColumn
        myDataColumn.DataType = System.Type.GetType("System.String")
        myDataColumn.ColumnName = "proccode"
        myDataColumn.Caption = "Procedure Code"
        myDataColumn.Unique = False
        myDataTable.Columns.Add(myDataColumn)

        myDataRow = myDataTable.NewRow()
        myDataRow("hours") = "12"
        myDataRow("proccode") = "Load: " + DateTime.Now.ToString()
        myDataTable.Rows.Add(myDataRow)

        Me.gv1.DataSource = myDataTable
        Me.gv1.DataBind()


    End Sub

 

Thanks help.

 
New Post
7/28/2008 10:26 AM
 

Are you sure your page is in a partial postback?  All you've confirmed in the above code is that it is posting back at all.  What you're seeing seems like it isn't doing a partial postback at all.

Have you added a ScriptManager control to the page?  You should handle the page's Init event, and call DotNetNuke.Framework.AJAX.RegisterScriptManager to make sure that your update panel will work correctly.

Hope it helps,


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
New Post
7/30/2008 5:29 PM
 

1) That was it.  Adding ScriptManager in Page_Load


        If DotNetNuke.Framework.AJAX.IsInstalled Then
            DotNetNuke.Framework.AJAX.RegisterScriptManager()
        End If

        If (Page.IsPostBack) Then Exit Sub

Thanks.

 

2) Follow-up:  How do I get the ProgressTemplage "gif" file to appear.  I see the gif  file in Visual Studio Designer window, but when I run I see the IMG ALT string: "ABC Loading"

What is the proper way to specify "SRC" path that would always work if I move or rename the website?

 

        <asp:UpdateProgress ID="UpdateProgress1"  AssociatedUpdatePanelID="UpdatePanel1" runat="server">
        <ProgressTemplate>
                 <img alt="ABC" src="../../images/Indicator-circleball.gif" />&nbsp;Loading ...
        </ProgressTemplate>

- Thx

 
New Post
7/31/2008 10:08 AM
 

Because you can't always guarantee the URL from which the image is being referenced, the best way to guarantee the path is to use the ResolveClientUrl method.  So, your image tag would look like <img alt="ABC" src='<%=ResolveClientUrl("~/images/Indicator-circleball.gif")%>' />

Hope that helps,


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
New Post
7/31/2008 11:38 AM
 

With ResolveClientUrl, the image appears  (sometimes) the first time.  Afterwards the ALT string appears.  While researching, I found a similar function ResolvetUrl which displays the image all the time.

http://www.andornot.com/about/developerblog/2007/06/resolveurl-vs-resolveclienturl.aspx

 

Thanks for your help.


 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0AJAX - UpdateProgress not displayingAJAX - UpdateProgress not displaying


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