This has probably already been answered, but I have searched through the Ajax forums looking for a clue on how to do this and haven't got one!
To start from the beginning...I have a MasterPage that has my header and footer stuff - no issues there. In my content page I call buttons from the MasterPage (not really a problem either - I don't think) the problem is that the content page is a tabcontainer with 3 tabs. Depending on certain criteria the tab index needs to be changed programmatically in my VB.net on click of one of the buttons from the Master page (hence the Masterpage note) I don't know how to reference the tabpanel of the tabcontainer to set the index to 0 or 1 or 2 (depending on criteria) and don't know Ajax well enough to know how to call the tabpanel in VB.net...
Any help/suggestions would be MUCH appreciated! TIA,
Seehttp://forums.asp.net/p/1071804/1723878.aspx
-Damien
Thanks Damien :-)
I don't know a thing about JavaScript, but I'm not sure that this will for me - not that it won't work - it obviously does, but I need to know if this can be done in the code-behind for VB? There are a lot of things happening in the VB code behind where I have to meet certain creiteria to show one tab, certain criteria for another and then show results in the last tab. How do I do this in my VB code? TIA,
Coleen:
but I need to know if this can be done in the code-behind for VB
Yes, that was in that post, for example: TabContainerName.ActiveTabIndex = 1
-Damien
Sorry - I missed the response to me in that thread last night - thank you, that helped!
P.S. One thing I missed (I figured this out - duh!) but you must have animports AjaxControlToolkit statement in your VB code behind in order to declare the variable for the TabConainer, which is why I didn't understand how that worked before. Like I siad, I'm very new to AJAX! Thanks for all the help on this!
No problem; glad you solved your issue!
-Damien
Actually, I just ran into a little snafu...
You know how I said that the master page has all the buttons? Well the snafu is that the master page has all the buttons - so the code behind has to go in the master page button click; but how do I referrence the TabContainer on the content page from the Master page?
You can use FindControl. Check outhttp://msdn2.microsoft.com/en-us/library/486wc64h.aspx andhttp://www.west-wind.com/WebLog/posts/5127.aspx for more info.
-Damien
Thanks again Damien, I'm still working on it, but I think this will work. Thank you very much!
No comments:
Post a Comment