注册 登录
编程论坛 jQuery论坛

有关Ajax问题

陈天 发布于 2007-10-31 23:08, 1645 次点击

小弟我刚刚学习Ajax技术,今天随便做了个界面,是用AjaxControlToolKit中的Accordion,是折叠的,但是当我点击Pane的头部时,就刷新了而且页面就一片空白。不知道是什么原因?请各位帮忙看看。

现贴代码如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Accordion.aspx.cs" Inherits="Accordion" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxToolKit" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>

<!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">
<title>Untitled Page</title>
<link rel="Stylesheet" type="text/css" href="style.css" />
</head>
<body>
<form id="form1" runat="server" method="post">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div class="demoarea">
<div class="demoheading">Accordion Demonstration</div>

<ajaxToolkit:Accordion ID="MyAccordion" runat="server" SelectedIndex="0"
HeaderCssClass="accordionHeader" ContentCssClass="accordionContent"
FadeTransitions="false" FramesPerSecond="40" TransitionDuration="250"
AutoSize="None" RequireOpenedPane="false" SuppressHeaderPostbacks="true">
<Panes>
<ajaxToolkit:AccordionPane ID="AccordionPane1" runat="server">
<Header><a href="" class="accordionLink">1. Accordion</a></Header>
<Content>
The Accordion is a web control that allows you to provide multiple panes and display them one at a time.
It is like having several <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="" Text="CollapsiblePanels" />
where only one can be expanded at a time. The Accordion is implemented as a web control that contains
AccordionPane web controls. Each AccordionPane control has a template for its Header and its Content.
We keep track of the selected pane so it stays visible across postbacks.
</Content>
</ajaxToolkit:AccordionPane>
</Panes>
</ajaxToolkit:Accordion>
</div>
</form>
</body>
</html>
请各位尽量帮忙!!!谢谢。

1 回复
#2
陈天2007-11-01 09:24
???
1