SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 279 | Next

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"

. .


"PanelClick" HeaderText="Controls">

. . .



But as you can imagine, the ContentTemplate tags can contain any desired HTML
markup as well as ASP.NET controls and functionality. Also, two event handlers are
defined here: the OnClientClick for the TabPanel (which fires when the tab is clicked) and
OnClientActiveTabChanged (which fires when the user switches to another tab). These
events are handled via JavaScript on the client and can be used to deliver further customization
to the behavior of the tabs such as UI changes. The following script snippet is
for the OnClientActiveTabChanged event handler, ActiveTabChanged:
function ActiveTabChanged(sender, e) {
var CurrentTab = $get('<%=CurrentTab.ClientID%>');
CurrentTab.innerHTML = sender.get_activeTab().get_headerText();
Highlight(CurrentTab);
}
In this script, the ClientID and the header text of the current tab are fetched, and the
selected tab is highlighted.


Pages:
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291