Solved

Attach onclick event to TabContainer/TabPanel

Posted on 2011-09-13
2
1,154 Views
Last Modified: 2012-05-12
I have a simple AJAX TabContainer control on a page with 4 tab panels. When the user clicks the last tab I need a message box to flash up. This event needs to be enabled/disabled on the basis of a value in a database and so code behind control is required (I write in VB). Adding an OnClientClick event to the tabpanel stops the entire control from rendering, whether I do it on the page or in code-behind. What am I missing?
0
Comment
Question by:deveson
2 Comments
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 125 total points
ID: 36528390
In jquery itself, you can check the variable and bind/unbind the onclick event

if(  flag == true )
{
   $("#last_tab").unbind("click");
}
else
{
   $("#last_tab").bind("click");
}

0
 

Author Closing Comment

by:deveson
ID: 36976778
I am unfamiliar with jquery but guess will need to learn this now to achieve objective
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question