Categories | Question details Back To List | ||
Using tabbar with ASP.Net MasterPage and ContentPage Hullo, What I'd like to do is set up a tabbar control in an ASP.Net 2.0 MasterPage. I'd like it so that when the user clicks a tab, the respective content page is loaded into the <asp:ContentPlaceHolder> control. I've found this post: http://www.dhtmlx.com/docs/products/kb/index.shtml?cat=search&page=1&q=8545&ssr=yes&s=[tabbar] but using the ajax-html method produces some weird results: clicking on a tab seems to load the both the masterpage and and content page inside the div that the tabbar control lives in. This that there suddenly appears to be another tabbar control immediately beneath the original ... Here is the code I have in my MasterPage.Master file: <table> <tr> <td align="left" style="width:1000px"> <div id="a_tabbar"></div> </td> </tr> <tr> <td> <asp:ContentPlaceHolder ID="MainContentHolder" runat="server"> </asp:ContentPlaceHolder> </td> </tr> </table> <script type="text/javscript"> tabbar=new dhtmlXTabBar("a_tabbar","top"); tabbar.setImagePath("codebase/imgs/"); tabbar.setStyle("modern"); tabbar.setHrefMode("ajax-html"); tabbar.setMargin(-10); tabbar.addTab("a1","Home","100px"); tabbar.addTab("a2","Information","175px"); tabbar.addContentHref("a1","Default.aspx"); tabbar.setContentHref("a2", "Information.aspx"); </script> The content pages simply have dummy text in for the time being; example: <%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPage.Master" CodeBehind="Information.aspx.vb" Inherits="TestSite.DSSMSSABInfo" title="Information Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="MainContentHolder" runat="server"> Just some filler information, nothing to see here... </asp:Content> Is there a better approach? Answer posted by Alex (supprot) on Apr 01, 2009 08:21 Hello, In case of ajax-html mode, content is loaded from a server and placed into a tab - and nothing else. It is hard to reproduce the described problem locally. Please, provide a direct link to problematic page (also you can send it to support@dhtmlx.com) - we'll try to help. Answer posted by SamuelHenderson on Apr 01, 2009 13:50 I see. I tried sending a sample zipped project, however the Gmail filters seemed to block most of the files... Answer posted by Alex (support) on Apr 02, 2009 04:31 Hello, we received your sample and sent the answer by email. Answer posted by SamuelHenderson on Apr 02, 2009 05:35 I received your file and took a look at it. I appreciate and thank you for your time in assisting me with this issue. Unfortunately those html files will not work in our ASP.Net project. It seems as you pointed out that the tabbar control and content are loaded into the same div. It simply seems impossible to use this control with Master and Content pages... However should we ever need to develop a non ASP.Net site this control will definitely be used. |