ASPAJAX TabContainer / TabPanel Setting

Is it possible to set the position of the tabs at the bottom of the tab using AjaxToolkit? You have some control over CSS, but I'm not good at CSS to figure out if this is possible?

thank

+3
source share
2 answers

You cannot use the ready-made version of this control, but you can easily change the source code to create your own version. Checkout AjaxControlToolkit \ Tabs \ TabContainer.cs (see below). You will need to reverse the order so that the RenderHeader () part appears below the RenderChildren () part. Alternatively, you can add a property to a control called "RenderHeaderFirst" or something similar to achieve the same functionality:

    protected override void RenderContents(HtmlTextWriter writer)
    {
        Page.VerifyRenderingInServerForm(this);

        // rendering the tabs (header)
        writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID + "_header");
        writer.RenderBeginTag(HtmlTextWriterTag.Div);
        {
            RenderHeader(writer);
        }
        writer.RenderEndTag();

        // rendering the contents of the tabs (children)
        if (!Height.IsEmpty)
            writer.AddStyleAttribute(HtmlTextWriterStyle.Height, Height.ToString());

        writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID + "_body");
        writer.RenderBeginTag(HtmlTextWriterTag.Div);
        {
            RenderChildren(writer);
        }
        writer.RenderEndTag();
    }

PS I have not tried this myself, but it seems to be in the right direction.

+3
source

Or you can just use the TabStripPlacement TabContainer property ...

TabContainer Properties

  • ActiveTabChanged (). - .
  • OnClientActiveTabChanged. javascript tabChanged .
  • CssClass. CSS . . "".
  • ActiveTabIndex.
  • - ( TabPanel)
  • -
  • ScrollBars - (None, Horizontal, Vertical, Both, Auto) TabContainer
  • TabStripPlacement - (, )
+3

Source: https://habr.com/ru/post/1698739/


All Articles