I have two standard USB panels when I press the button I need to process fields on panel one, then hide panel one and display panel two. However when I press the button, the loading panel displays and the code behind fires... but once it is complete and the loading panel is hidden again the next panel is not shown. I have stripped the code down in another temporary file to remove all style sheets, external scripts etc etc and the problem still remains...
I simply can't see where I'm being stupid, please help :)
Partial Class matt_test Inherits System.Web.UI.Page Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click Panel1.Visible = False pnl_test.Visible = True System.Threading.Thread.Sleep(2000) End SubEnd Class
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="matt-test.aspx.vb" Inherits="matt_test" %><%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"></head> <body><form id="form1" runat="server"><asp:ScriptManager ID="ScriptManager1" runat="server" SupportsPartialRendering="True" /> <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> var currentLoadingPanel = null;var currentUpdatedControl = null; function RequestStart(sender, args) { currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID%>"); if (args.get_eventTarget() == "<%= Button1.UniqueID %>") {currentUpdatedControl = "<%= Panel1.ClientID %>"; currentLoadingPanel.show(currentUpdatedControl);} } function ResponseEnd() { if (currentLoadingPanel != null) { currentLoadingPanel.hide(currentUpdatedControl);}currentUpdatedControl = null;currentLoadingPanel = null;} </script> </telerik:RadCodeBlock> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="Button1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="Panel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" /> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" BackgroundPosition="Center" EnableSkinTransparency="true" Visible="true" /> <div id="frame_mobilecontent"> <asp:Panel ID="Panel1" runat="server" class="RegInputWrapper">This<br />Is<br />A<br />Test<br />Panel<br /> </asp:Panel> <asp:Panel runat="server" ID="pnl_test" style="background-color:Red;width:300px;height:600px;" visible="false">This<br />Is<br />A<br />Test<br />Panel 2<br /></asp:Panel> <asp:Button ID="Button1" runat="server" Text="Button" /> </div> </form> </body> </html>