I'm having a problem with the AjaxControlTollkit Tabs. I want to remove the borders of the tabs since I do not really need them (display reasons). Here is a simplified sample of my code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default-Defaut.aspx.cs"
Inherits="TinTan._Default" MasterPageFile="~/CLF20.Master" Culture="auto"
UICulture="auto" EnableEventValidation="false" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentMain" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"
EnablePageMethods="True" CombineScripts="True">
<Services>
<asp:ServiceReference Path="AutoComplete.asmx" />
</Services>
</asp:ToolkitScriptManager>
<div>
<!--tabs in which all the options will be avaible (using AJAX for faster respone)-->
<asp:UpdatePanel ID="UpdatePanel" runat="server" UpdateMode="Always">
<Triggers>
<asp:PostBackTrigger ControlID="btnPostBack" />
</Triggers>
<ContentTemplate>
<asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" OnClientActiveTabChanged="CheckActiveTab" OnActiveTabChanged="TabContainer_ActiveTabChanged"
BorderWidth="0px" >
<asp:TabPanel ID="tabAddTan" runat="server" Visible="false">
<HeaderTemplate>
Add Tan (Admin)
</HeaderTemplate>
<ContentTemplate>
<div class="divTable">
<div class="divRow">
<asp:Label ID="lblAddTanTitle" runat="server" Text="Add TAN" Font-Bold="true" Font-Size="Large"></asp:Label>
</div>
</div>
<asp:UpdatePanel ID="pnlAddTan" runat="server" UpdateMode="Always">
<ContentTemplate>
<div class="divTable">
<div class="divRow">
<asp:AsyncFileUpload OnUploadComplete="UploadComplete" runat="server" OnUploadedComplete="UploadComplete"
ID="AsynchAddTan" />
</div>
<div class="divRow">
<asp:Button ID="btnAddTanClick" runat="server" Text="Upload File" OnClick="UploadComplete" />
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</asp:TabPanel>
</asp:TabContainer>
Here is what I tried and the results:
- Using the BorderWidth="0px", BorderStyle="none", BorderColor="white" properties: it did not work, the borders were unchanged
- adding a CSS class and linking it the the TabContainer with the CssClass property: It removed ALL the style of the tabs, the tabs Header were only plain text. The borders were not there thought
Here is the CSS I used:
<style type="text/css">
.AjaxBorder .ajax__tab_body
{
border:0;
}
.AjaxBorder .ajax__tab_tab
{
height:13px;
padding:4px;
margin:0;
background:url(Tabs/tab.gif) repeat-x;
}
</style>
It is situated in teh master page. When I was trying to link it to the AjaxTabContainer with CssClass, the .Ajaxborder class was in the choices VS2010 was offering me.
- Using the style property and putting border:0 none white; in it: same result as the 1st try, there was no changes to the ajax tabs.
The closest I have been to my goal was the 2nd option. But I do not understand why it removes all the style of the tabs when I am only telling him to remove the borders. I also do not understand why the other options do not do a single thing to the tabs.
Thanks Hugo