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.