Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I am using Telerik rad tabs control in my page where I am using its RadTabStrip1_TabClick and OnClientTabSelected both. For one tab I have to use server side code and for others I just need the OnClientTabSelected event and it should not fire the server side code,so my question is that how I restrict the code to reach server side for those tab click where I don't need server side code.

I have used return false but it didn't work;
C#
function onClientTabSelected(sender, args) {
            //set tab value

            var tabText = args.get_tab().get_index();

            var tab = sender.get_selectedTab().get_text();


            if (tab == 'Posts') {

            ShowPostLinks();
        return false;
//stop hitting server side code

            }
            if (tab == "Linkings") {
        return true;
//go to server side
            }
        }
Posted
Updated 10-Jun-11 5:23am
v4

Ask your question here[^].
 
Share this answer
 
Try this to stop post back.

args.set_cancel(true);

This will cancel the event.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900