Change active tab via code

I'd like to change the selected tab via code.
I've tried setting the SelectedIndex to no avail.
Is it possible to change the selected tab via code?

SelectedIndex actually works pretty well:



I have the same problem. I think the question is in the code behind file and not based off a user event (like a button click). This is pretty easy with JavaScript but seems difficult here.

Check this thread: