我对 RadAjaxLoadingPanel 有疑问。我无法以正确的方式使用它。这里有我的代码示例。在我使用 SkinManager 下拉菜单更改皮肤后,LoadingPanel 开始工作。任何人都可以帮助我并告诉我在没有这个技巧的情况下我必须做什么才能让它工作吗?
我的页面:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="TelerikWebApp1.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="SkinManager1" runat="server" ShowChooser="true" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="Panel1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<div>
<asp:Panel ID="Panel1" runat="server" HorizontalAlign="Center" Height="275px" Style="padding-top: 15px; padding-left: 15px">
<asp:Button ID="Button1" runat="server" Text="Click to see the loading image" OnClick="Button1_Click"></asp:Button>
</asp:Panel>
</div>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>
</form>
</body>
</html>
后面的代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
namespace TelerikWebApp1
{
public partial class WebForm1 : System.Web.UI.Page
{
public void Button1_Click(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(2000);
}
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
谢谢你的帮助。