Ajax Control Toolkit:Accordion控件详解与应用

需积分: 0 0 下载量 23 浏览量 更新于2024-08-30 收藏 135KB PDF 举报
"Ajax Control Toolkit是ASP.NET开发中的一组服务器端控件,它提供了丰富的交互性和用户体验。在本文中,我们将重点关注Accordion控件,它是Ajax Control Toolkit中的一个重要组件,用于创建可折叠面板的布局,类似于QQ和Msn好友分类的折叠效果。 Accordion控件允许开发者在网页上创建多个面板(AccordionPane),并且每次只展示一个面板的内容。每个AccordionPane由Header和Content两部分组成,开发者可以自定义这两个区域的内容。在后台代码中,可以通过SelectedIndex属性来获取或设置当前展开的面板,从而实现对用户交互的控制。 在使用Accordion控件时,有几点需要注意: 1. 避免将Accordion置于Table中,并同时启用FadeTransitions(淡入淡出效果),这可能导致布局问题。 2. AccordionPane的Content区域可以容纳任何Web元素,作为一个容器,可以根据需求添加各种控件和内容。 3. AccordionPane的Content大小调整有三种模式:None(推荐)、Limit和Fill,开发者可以根据需要选择合适的大小调整策略。 4. 在JavaScript中,可以使用$find方法获取Accordion的Behavior对象,该对象封装了Accordion的行为,如淡入淡出效果。通过调用behavior.set_FadeTransitions()和behavior.get_FadeTransitions()等方法,可以控制特定Behavior的属性。 以下是一个简单的JavaScript示例,用于切换Accordion的FadeTransitions效果: ```javascript <script language="javascript" type="text/javascript"> function toggleFadeTransitions() { var behavior = $find("<%=MyAccordion.ClientID%>_AccordionExtender"); if (behavior.get_FadeTransitions()) { behavior.set_FadeTransitions(false); } else { behavior.set_FadeTransitions(true); } } </script> ``` 这个例子展示了如何在客户端通过JavaScript与服务器端的Accordion控件进行交互,动态开启或关闭淡入淡出动画效果。 Ajax Control Toolkit的Accordion控件为ASP.NET开发者提供了一种高效、灵活的方式来构建动态展示内容的界面,增强了用户体验。正确理解和使用这些控件的特性,可以帮助开发者创建更加互动和用户友好的网页应用。"

make for plat=atlas310 cross=aarch64-ascend310-linux-gnu- LDFLAGS=-Wl,--gc-sections -static -L/home/257916/server/test/v1.1/Trunk/build/../src/thirdpart/libs/atlas310 -L/home/257916/server/test/v1.1/Trunk/build/../lib/atlas310 -ldw -lbs -lpthread -lm EXTRA_CFLAGS=-DSVN_VERSION="\"64670"\" -I /net -DOSA_MODULE_NAME=Spectrum-Convert@64670 -DBUILD_DATE="\"Mon, 24 Jul 2023 19:48:54 +0800"\" CFLAGS=-D_GNU_SOURCE -I/home/257916/server/test/v1.1/Trunk/build/../include -I/home/257916/server/test/v1.1/Trunk/build/../src/base/include -I/home/257916/server/test/v1.1/Trunk/build/../src/base/test/include -I/home/257916/server/test/v1.1/Trunk/build/../src/decode/include -I/home/257916/server/test/v1.1/Trunk/build/../src/decode/test/include -I/home/257916/server/test/v1.1/Trunk/build/../src/fourier/include -I/home/257916/server/test/v1.1/Trunk/build/../src/fourier/test/include -I/home/257916/server/test/v1.1/Trunk/build/../src/include -I/home/257916/server/test/v1.1/Trunk/build/../src/service/include -I/home/257916/server/test/v1.1/Trunk/build/../src/service/test/include -I/home/257916/server/test/v1.1/Trunk/build/../src/draw/include -I/home/257916/server/test/v1.1/Trunk/build/../src/draw/test/include -I/home/257916/server/test/v1.1/Trunk/build/../tools/include -fPIC -ffunction-sections -fdata-sections -g -Wall -O1 -c -o ############################################################ mkdir -p /home/257916/server/test/v1.1/Trunk/build/../bin/atlas310 aarch64-ascend310-linux-gnu-g++ -o draw test/src/draw_pic_test.o -Wl,--gc-sections -static -L/home/257916/server/test/v1.1/Trunk/build/../src/thirdpart/libs/atlas310 -L/home/257916/server/test/v1.1/Trunk/build/../lib/atlas310 -ldw -lbs -lpthread -lm /opt/Atlas310-ascend/toolkit/toolchain/hcc/bin/../lib64/gcc/aarch64-target-linux-gnu/7.3.0/../../../../aarch64-target-linux-gnu/bin/ld: test/src/draw_pic_test.o: Relocations in generic ELF (EM: 62) /opt/Atlas310-ascend/toolkit/toolchain/hcc/bin/../lib64/gcc/aarch64-target-linux-gnu/7.3.0/../../../../aarch64-target-linux-gnu/bin/ld: test/src/draw_pic_test.o: Relocations in generic ELF (EM: 62) /opt/Atlas310-ascend/toolkit/toolchain/hcc/bin/../lib64/gcc/aarch64-target-linux-gnu/7.3.0/../../../../aarch64-target-linux-gnu/bin/ld: test/src/draw_pic_test.o: Relocations in generic ELF (EM: 62) /opt/Atlas310-ascend/toolkit/toolchain/hcc/bin/../lib64/gcc/aarch64-target-linux-gnu/7.3.0/../../../../aarch64-target-linux-gnu/bin/ld: test/src/draw_pic_test.o: Relocations in generic ELF (EM: 62) /opt/Atlas310-ascend/toolkit/toolchain/hcc/bin/../lib64/gcc/aarch64-target-linux-gnu/7.3.0/../../../../aarch64-target-linux-gnu/bin/ld: test/src/draw_pic_test.o: Relocations in generic ELF (EM: 62) /opt/Atlas310-ascend/toolkit/toolchain/hcc/bin/../lib64/gcc/aarch64-target-linux-gnu/7.3.0/../../../../aarch64-target-linux-gnu/bin/ld: test/src/draw_pic_test.o: Relocations in generic ELF (EM: 62) /opt/Atlas310-ascend/toolkit/toolchain/hcc/bin/../lib64/gcc/aarch64-target-linux-gnu/7.3.0/../../../../aarch64-target-linux-gnu/bin/ld: test/src/draw_pic_test.o: Relocations in generic ELF (EM: 62) /opt/Atlas310-ascend/toolkit/toolchain/hcc/bin/../lib64/gcc/aarch64-target-linux-gnu/7.3.0/../../../../aarch64-target-linux-gnu/bin/ld: test/src/draw_pic_test.o: Relocations in generic ELF (EM: 62) /opt/Atlas310-ascend/toolkit/toolchain/hcc/bin/../lib64/gcc/aarch64-target-linux-gnu/7.3.0/../../../../aarch64-target-linux-gnu/bin/ld: test/src/draw_pic_test.o: error adding symbols: file in wrong format collect2: error: ld returned 1 exit status make[1]: *** [draw] Error 1 make[1]: Leaving directory `/home/257916/server/test/v1.1/Trunk/src/draw' make: *** [draw] Error 2

2023-07-25 上传