手风琴控制的onClick事件 [英] onClick event for Accordion Control
本文介绍了手风琴控制的onClick事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有一种快速的方法可以在服务器端将事件处理程序添加到手风琴控件?
Is there any quick way to add an event handler on the server-side to an accordion control?
推荐答案
显然,您可以通过指定事件和标记中的处理程序. (我说的显然是因为我目前没有控制权.)
Apparently you can hookup events by specifying the event and handler in the markup. (I say apparently as I do not actually have the control to play with at this moment.)
<cc1:Accordion
ID="AccordionResults"
runat="server"
DataSourceID="SqlDataSourceResults"
SelectedIndex="-1"
RequireOpenedPane="false"
FadeTransitions="true"
HeaderCssClass="accordionHeader"
HeaderSelectedCssClass="accordionHeaderSelected"
ContentCssClass="accordionContent"
Width="800px"
OnItemCreated="InitPanes" />
和onItemCreated
调用:
And onItemCreated
calls:
Protected Sub InitPanes(ByVal sender As Object, ByVal e As AjaxControlToolkit.AccordionItemEventArgs)
Dim myAccordionPane As AjaxControlToolkit.AccordionContentPanel = CType(e.AccordionItem, AjaxControlToolkit.AccordionContentPanel)
Dim workAroundLabel As New Label
workAroundLabel.Visible = False
myAccordionPane.Controls.Add(workAroundLabel)
End Sub
这篇关于手风琴控制的onClick事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文