For a website I was asked to put a bunch of information inside a few different categories. The tabpanel seemed fitting for this, and the person I made it for approved of the simple and elegant sollution.
However, he now has a somewhat tricky request: he wants it so that when people print (javascript::print()), they would be able to see all the information entered in the different tabs. Normally I would solve a thing like this with a different print rules inside my css file. However, in this case, the javascript attached to the tabcontainer/tabpanels puts the visibility:hidden on the elements themselves, meaning whatever I may write inside the css would be ignored either way.
Is there any simple way of making it so that these tabs will be shown when printing?
Preferably a sollution that doesn't require me to rewrite most of the tabcontainer/panel code or making my own control from scratch. I would think that this "should" be achievable through javascript, but I thought I'd check here for ideas before rushing into things.
I am trying to use the TabContainer/TabPanel controls to create 3 tabs. The tabs themselves will always appear, however, only the first tab will ever display. When I look at the source of the page, I find that the 2nd and 3rd panels have style="visibility:hidden;display:none" on them. The only time this is not true, is if the content inside the tables is text that is on the source, nothing generated.
I have tried it using controls, repeaters, adding all my tabs dynamically, setting the properties of visibility=True and enabled=true. I am kind of pulling my hair out here.
ASPX coding:
<asp:TabContainer ID="aeDetails" runat="server"> <asp:TabPanel ID="placeholder" runat ="server" HeaderText ="PlaceHolder" ><ContentTemplate >Place Holder</ContentTemplate></asp:TabPanel> </asp:TabContainer> VB.NET Code: ' Get the content for the home page. getHomePageContent() ' get the announcements, if any getAnnouncements() ' get the events, if any getEvents() ' remove placeholder after adding all three tabs For i As Integer = 0 To aeDetails.Tabs.Count - 1 If aeDetails.Tabs(i).HeaderText = "PlaceHolder" Then aeDetails.Tabs.RemoveAt(i) Exit For End If Next
I will only put the code for one tab in here as they are all pretty much the same.
Private Sub getAnnouncements()
Dim nt As TabPanel = New TabPanel() nt.HeaderText = "Viscardi Announcements" nt.ID = "tpAnnouncements" nt.Visible = True nt.Enabled = True Dim nl As Label = New Label() Dim sb As StringBuilder = New StringBuilder() Dim anRec As HVS_Announcements_Record = New HVS_Announcements_Record Dim anList As List(Of HVS_Announcements_Record) = getCurrentAnnouncments() Select Case anList.Count < 1 Case True nl.Text = "There are currently no announcments for the Henry Viscardi School" nt.Controls.Add(nl) aeDetails.Tabs.Add(nt) Return End Select sb.Append("<ul>") For Each anRec In anList sb.Append("<li><a onclick='MM_openBrWindow") sb.Append("('announcementDetails.aspx?id=" & anRec.HVS_AR_Id & "','newWindow','status=yes,scrollbars=yes,resizable=yes,width=600,height=500'") sb.Append("target='_blank' title='Click to view full contents of the announcements'>") sb.Append(anRec.HVS_AR_AnnouncementTitle & "</a></li>") Next sb.Append("</ul>") nl.Text = sb.ToString() nt.Controls.Add(nl) aeDetails.Tabs.Add(nt) End Sub
All of the content that is generated by the various routines is in the page source, just hidden.
i have a tabcontainer which have 3 tab panels(tbpanel1,tbpanel2,tbpanel3)and i have dropdownlist in each tabpanel to select date(with autopost back=True).so if i select the date from tab panel2 or tabpanel 3 it is automatically going to tabpanel 1.but it should be in the same tabpanel.
I'm developing a web page with tabcontainer. I want to hide one tabpanel on the client side. So I don't want to se "TabContainer1.Tabs(0).Visible = False" as I want it to be a client side event. I tried following code in js
" var objTab = $find('<%=TabContainer1.ClientID%>'); objTab.get_tabs()[0]._hide(); //objTab.get_tabs()[0]._show(); "
However, it doesn't work for the first time loading the page. I guess it only works when an ajax postback happens. Is there any way to hide this when I first load the page, and then if I click on button "show", it will show up without any ajax postback (backend coding)?
I have an Accordion within a Tab container and it works until I set the Accordion AutoSize to Fill or Limit, then my Accordion disappears. I get the same result with IE7, FireFox 2.0.0.8 and Opera 9.24. Is it possible, or at least supposed to be possible to do this?
I have a tabcontainer which has 7 tab panels and on certain conditions i want to make 1 tab either visible false or remove from the TabContainer. Firstly, i had set tab visible false but by doing this my TabContainer1_ActiveTabChanged event fired twice intially when i select the tab panel then it fire and shows my correct ActiveTabIndex number but but at the same moment it fires again with 1 Decrement in ActiveTabIndex number.
I could not understand why it is happening.What thing makes the ActiveTabIndex number decremented by 1. If select Tab 3 then it shows me result of 2 and so on.
Why this event firing twice i set any tab Visible false.
I have two pages with TabControls and the tabcontrols have several tabpanels. On one page there are some popupcontrol extenders on the first tab, and that page works fine. On the second page, the popupcontrolextenders are on the second tab. When that page loads, I get the following jscript error:
Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors. Parameter name: element
I've tried setting the Enabled property to false for these popupcontrolextenders until that tab becomes visible. This prevents the error on page load, but but then the same error happens as soon as that tab becomes visible.
Is it possible to use a popupcontrolextender on a tabpanel, or should I give up and try something different?
I need to set the focus to a control present in a tabpanel within a tabcontainer . The focus needs to be set based on the input validation of the controls, i.e if any input validation fails then we need to set activetabindex of the container to panel where the control resides and set the the focus to control. Can we set activetabindex for the tabcontainer by finding the control and also setfocus to the control .If any viable solution is there
The Tabpanel is not showing in toolbox. I have installed the toolbox using the posted instructions. I have a TabContainer but no panel. It is notan item that even shows when I try to select my toolbox items.
The header text in the tab panel is too small and I wanted to make it bigger. So I included a <span> within the <HeaderTemplate> tags and though the text is larger according to the style of the span it doesn't display properly because the height of the tab (not the panel but just the tab part that sticks above the panel) doesn't become any bigger and I don't see where I can modify this.
I have an ajax tabcontainerpanel. What I would like to do is programatically change the text (header template text value) of one of the TabPanels (ID="TabPanel10B") depending on the selected option of a dropdownlist. Is this possible?
TabSecciones.Tabs.Clear(); //the panel container TabPanel nuevoTab = new TabPanel(); encabezadoSeccion encabezadoSec = new encabezadoSeccion(); //A user control, a couple of labels and a table nuevoTab.Controls.Add(encabezadoSec); TabSecciones.Tabs.Add(nuevoTab);
For some strange reason, the user control is "outside" of the panels, thus visible no matter what panel is selected... if I programatically insert another control (ie: a texbox) inside another panel, it works fine...
I had a standard ASP.NET page where I had a some client side Java script make some controls visible/enabled if a checkbox was clicked or not.
[Code]....
Now I would like to move this same WebForm functionality into a AJAX Control Kit TabControlPanel
[Code]....
Here is what I have tried, but it won't compile. I get the following error. Where do I put the script and how do I reference controls in the AJAX TabControlContainer?
Error 10 'ASP.default_aspx' does not contain a definition for 'Email2Checkbox' and no extension method 'Email2Checkbox' accepting a first argument of type 'ASP.default_aspx' could be found (are you missing a using directive or an assembly reference?) C:InetpubwwwRootAjaxTestSiteDefault.aspx 458
I am trying to use a tabContainer and two tabPanels inside a ItemTemplate of a Formview.
As soon I put them in the ItemTemplate I receive the following error on the formView control in design view:
"There was an error rendering the control. Could not find any resources appropriate for the specifie culture or the neutral culture. Make sure AjaxControlToolKit.Properties.Resources.NET4.Resources was correctly embedded or linked into assembly AjaxControlToolKit at compile time, or that all the satellite assemblies required are loadable and fully signed.
I have a scriptManager tag in the master page and an updatePanel in the content page.
I have a form I'm trying to insert inside a TabPanel. It's actually code PayPal gave me to insert a buynow button. The problem is that the form tags are causing my tabs to either have extra space on the bottom or top (depending on the tab) in IE. Firefox the problems do not happen and everythind displays correctly. Any idea how I can fix this in IE. It seams as if IE is leaving part of the other tab visible if I have form tags in the TabPanel.
I have a tabcontainer with a number of tabPanels. Each tabPanel has a placeholder tag which is set dynamically with relevant user control classes(ascx). When a button is clicked from a ascx within a placeholder, the onclick event does not get executed. How can I get this to work??
I've tried setting the Font-Bold and ForeColor properties on both the TabPanel and its parent TabContainer with no apparent results. I've also tried doing it through CSS, again with no success. Has anyone found a way to do this?
I have a TabContainer with 3 TabPanels. The container has a yellow background. On the first tab the yellow background is the height of all the controls. On tab 2 and tab 3 I just get a strip of yellow and then below that is my table of controls. The controls are outside of the TabPanel border. I checked the code and my table on each tab is between the <ContentTemplate> tags. This was not doing this before. This app is VS 2005 with Ajax Version=1.0.61025.0 All I have changed is installing VS 2010. I even took an old backup and it's still doing the strip of yellow on tab 2 and tab 3. Here is my stylesheet: