Shawn,
Thanks for your prompt reply. I tried your suggestion. I updated the .js file and recompile the toolkit probject, re-referenced to my project. Now, what do I need to change in my code, either in aspx or in aspx.cs? It doesn't seem to be working. Do I still need to keep OnInit event.
This is the code I've changed and it's not working. Thanks for your help!
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True" EnableScriptComponents="True" />
</head>
<body>
<form id="form1" runat="server">
<div>
<p>Refresh data every
<span style="width:100%;">
<asp:Label ID="Slider1_BoundControl" runat="server"></asp:Label> seconds.
<asp:TextBox ID="Slider1" runat="server" style="right:0px" OnTextChanged="Slider1_TextChanged"></asp:TextBox>
</span>
<cc1:SliderExtender ID="SliderExtender1" runat="server">
<cc1:SliderProperties Minimum="5" Maximum="60" Steps="12" Orientation="Horizontal" EnableHandleAnimation="true" TargetControlID="Slider1" BoundControlID="Slider1_BoundControl">
</cc1:SliderProperties>
</cc1:SliderExtender>
</p>
<atlas:UpdatePanel ID="panelImportStatus" runat="server" Mode="conditional" >
<ContentTemplate>
<div>
<asp:Label ID="lblUpdate" runat="server" />
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="true"
AllowSorting="True" BackColor="White" BorderColor="#DEDFDE"
BorderStyle="None" BorderWidth="1px" CellPadding="4" EnableViewState="false"
DataSourceID="ObjectDataSource1" ForeColor="Black" GridLines="Vertical">
<FooterStyle BackColor="#CCCC99" />
<RowStyle BackColor="#F7F7DE" />
<SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
<HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="GetImportStatus"
TypeName="Bll.ImportStatus"
>
</asp:ObjectDataSource>
</div>
<atlas:TimerControl ID="Timer1" runat="server" Enabled="true" Interval="5000" OnTick="ImportStatus" />
</ContentTemplate>
<Triggers>
<atlas:ControlEventTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</atlas:UpdatePanel>
</div>
</form>
</body>
</html>
protected void UpdateImportStatus(object sender, EventArgs e)
{
panelImportStatus.Update();
lblUpdate.Text = "Last updated: " + System.DateTime.Now.ToString();
}
protected void Slider1_TextChanged(object sender, EventArgs e)
{
lblUpdate.Text = "Updating data...";
Timer1.Interval = Convert.ToInt32(Slider1.Text.ToString()) * 1000;
//Timer1.DataBind();
panelImportStatus.Update();
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
//panelImportStatus.Triggers.Clear();
//ControlEventTrigger t = new ControlEventTrigger();
//t.ControlID = "Timer1";
//t.EventName = "Tick";
//if (Slider1.Text != "")
// Timer1.Interval = Convert.ToInt32(Slider1.Text.ToString()) * 1000;
//panelImportStatus.Triggers.Add(t);
}