Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi, I have an ajax container which will be created dynamically in C#. I would like the container width to be set to 100%. Have researched online for quite awhile but still can't figure out how to set the width to 100%.

This is my codes:
ASP.NET
//Aspx file
 <div>
             <asp:scriptmanager ID="ScriptManager1" runat="server">
            </asp:scriptmanager>
        </div>
        <asp:updatepanel ID="UpdatePanel1" runat="server" ScrollBars="Horizontal">
            <contenttemplate>
        <asp:placeholder ID="PlaceHolder1" runat="server"></asp:placeholder>

                <asp:Chart runat="server">

                </asp:Chart>

            </contenttemplate>
        </asp:updatepanel>

//Cs file
AjaxControlToolkit.TabContainer container = new AjaxControlToolkit.TabContainer();
            container.ID = "TabContainer";
            container.EnableViewState = false;
            container.Tabs.Clear();
            container.Height = Unit.Pixel(2000);
            container.Width = Unit.Pixel(2000);
            container.Tabs.AddAt(0, GetManualTab());


Question: How to set Ajax tab container width to 100% if the container is created dynamically in c#?

Appreciate if anyone provide me help on this. Thanks a lot!!
Posted
Comments
Krunal Rohit 1-Oct-15 0:39am    
You can set the width to 100% of parent control of the TabContainer in ASPX file.

-KR

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900