The code above will create 4 tabs in the page. Now comes time to add functionality to these tabs.
The most common functionality which we have seen in something like this is that a user clicks different tabs and pages corresponding to the tabs are displayed to the user. I was trying to implement this TabStrip for similar functionality in my project but I was disappointed to see that there is not property or method like Treenode.NavigateUrl. So I created an iframe in the page like this:
This src="<%=sIFrameSrc%>" is important as in the code behind page we will populate frame source so that we can get required functionality of switching between different pages.
When you click on different tabs mytabstrip_onSelectedIndexChange is called so this is the place where we can change srcframe to different pages.
Private Sub mytabstrip_onSelectedIndexChange(ByVal sender As Object, ByVal e As System.EventArgs) Handles mytabstrip.SelectedIndexChange Dim sdata As String Select Case mytabstrip.SelectedIndex Case 0 tabname = "tab1" sIFrameSrc = "http://www.oxx.no" Case 1 tabname = "tab2" sIFrameSrc = "http://www.yahoo.co," Case 2 tabname = "tab3" sIFrameSrc = "your choice" Case Else sIFrameSrc = "http://www.oxx.no" End Select End Sub
You should now be able to set up a working TabStrip on your page. The code I have provided is very simple but these controls can be utilized in many applications.