.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

ComboBox in initially closed Accordion pane

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :ASP.Net

I have spent the good part of a full day trying to come up with a solution for this and I have failed.

When the pane loads the problem is the combobox shows but the drop down does not show for it.

I have tried loading the accordion with selectedindex=0 and everything works fine.

I have also tied to set the selectedindex of the accordion in page load but I have not been able to get that to work so not sure if that solution would work or not.

Any help would be great I really need to get this fixed.

Here is the code.

<asp:Accordion Width="90%" runat="server" SelectedIndex="1" FadeTransitions="True" TransitionDuration="100" 

View Complete Post

More Related Resource Links

ComboBox in non selected accordion Pane do not render correctly

the combo boxes in the originally selected accordion pane work just fine. But when I navigate to one of the other pane those combo boxes show up as a textbox with a very tiny square button for a dropdown arrow and no popup dropdown list to select from. below is my code for the accordion<cc1:Accordion ID="Accordion1" HeaderCssClass="accordionHeader"              HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent" Font-Bold="True" runat="server">             <Panes>                 <cc1:AccordionPane ID="aP1" runat="server">                     <Header >ComboBox 1</Header>                     <Content>                         <cc1:ComboBox ID="cmb1" runat="server" RenderMode="Block">                             <asp:ListItem Text="item 1"></asp:ListItem>                 

how to maintain state of accordion pane from one page to another

 Hi,   I am using accordion control in one of my project. I want to maintain the state of the accordion pane when the user navigates from one page to another. Can someone help me  ?? Below given is the code of my accordion control I do not want to use query string because i am using url rewriting. <cc1:Accordion   ID="accNavMenu" runat="server" TransitionDuration="100"    FramesPerSecond="200" FadeTransitions="true" RequireOpenedPane="false"    OnItemDataBound="accNavMenu_ItemDataBound"   ContentCssClass="sidenav2" HeaderCssClass="sidenav"    HeaderSelectedCssClass="acc-selected">    <HeaderTemplate>    <asp:HiddenField ID="hdTemplate" runat="server"           Value='<%# DataBinder.Eval(Container.DataItem,"Template") %>'      />     <asp:HiddenField ID="hdSectionID" runat="server"           Value='<%# DataBinder.Eval(Container.DataItem,"SectionID") %>'      />    <table cellpadding="0" cellspacing=&quo

Accordion pane client click event


Who knows how to add onClick event to accordion pane in Ajax asp accordion ? Is it the same as adding it as attribute in server side or

there is another way in client side?

Finding accordion pane client event


I have problem with accordion pane client side events and found this solutions on old posts:

function accSelectedChange(sender, eventArgs) {

if (eventArgs.get_propertyName() == "SelectedIndex")






function pageLoad() {



The reason that it doesn't work is because the Accordion control is actually a wrapper for the AccordionExtender, so the ClientID of the element is not the same thing as the ClientID of the behavior. Unfortunately, the ClientID of the underlying Extender is not exposed through the Accordion class, but you can obtain its value by appending _AccordionExtender to the ClientID like so:
ClientScript.RegisterArrayDeclaration("arrAccordionBehaviors", "&#

Adding Accordion pane dynamically on button click


Hi All,

As per my need I want to dynamically load accordion pane and inside that I want to load an ascx control. I am attaching my code for reference. But when I run my code it does not create separate pane. Can any one help me to fix this problem.

Sample Code part:

protected void Button1_Click(object sender, EventArgs e)
        i = i + 1;
        Label l = new Label();
        l.ID = "l" + i.ToString();

How to display related tables in one crystal report and how to link this report with combobox?


Hi! I want to display a crystal report in my vb.net application. Suppose I have tables named student details, student marks, student address, etc... Now if I want to display all these details (fields of all tables) in one crystal report (with page breaks if necessary) then how will I achieve it. I will be providing a combo box in my application that contains list of student names. How can I link this combo box with the cystal report to dynamically display report for different student on selected index change of combo box? Help me friends. An example would be appreciable.

Patterns in Practice: The Open Closed Principle


Extending an existing codebase can be as productive and frustration-free as writing all new code when you employ the Open Closed Principle. We'll show you how.

Jeremy Miller

MSDN Magazine June 2008

C++ at Work: Addin a Combobox Cancel Feature


This month Paul DiLascia codes some Microsoft Office-style dialog box features.

Paul DiLascia

MSDN Magazine August 2006

ActiveX and Visual Basic: Enhance the Display of Long Text Strings in a Combobox or Listbox


The combobox and listbox controls in Visual Basic have no built-in support for displaying text strings that are too long to fit in the visible area of either control. This article describes several techniques to improve the readability of long strings in each control. The first technique uses tooltips to display a combobox or listbox item. The other techniques, which use various Windows APIs, include adding a horizontal scrollbar for a listbox and determining the necessary width of the longest string given the font attributes of the text. The required steps are described for both comboboxes and listboxes.

John Calvert

MSDN Magazine December 2000

Using SqlDataSource as the Datasource to Accordion



The accordion does not renders. What am I missing? I want to use a parent child kind of accordion. Perhaps the child is not defined correctly, but I would like to see at list the seven tabs with the name of each organ system show up. The numbers of records for each organ system varies and I need a text box for each organ/tissue to be displayed, so I can insert in a findings table.

Here is what I have

new protected void Page_Load(object sender, EventArgs e)
            ModalPanel.Visible = false;
            ds1 = GetSqlOrganSystems();

protected SqlDataSource GetSqlOrganSystems()

         SqlDataSource dsL = new SqlDataSource();
            dsL.ID = "ds1";
            //#DataBinder.Eval(Container.DataItem,"Organ_System_ID" DataBinder.Ev

Accordion Control with Panel...Add an Update Panel?


I have an accordion control in my web site.  And in one of the panels, I have a drop down list box where, when the user selects an item, it updates the labels right below the ddlistbox.  I have it so that it maintains the scroll position when the ddlistbox has an autopostback, but it's very obvious that the whole page posts back.

My question is, can I/should I just enclose the ddlistbox and the labels (and a couple of text boxes) in an AJAX update panel?  I already have a ToolScriptManager (because of the accordion control), so I don't need to have another script manager, right?  I can just put the update panel (with the other controls inside of it) right in the accordion panel, right?  Then when the ddlistbox posts back it won't have the delay of the whole page posting back?  And it'll still execute the event handler for the listbox selection change?

Does this sound right?  I'm just looking to make the post back "invisible", and I would like to do a partial postback of just these few controls.

Thanks in advance! :)

The underlying connection was closed: An unexpected error occurred on a send.


I am consuming a third party web service wsdl using my .net aps.net page. And I am getting following error message. Cannt get to resolve it. Its working on my machine but not in my development machine. I have installed the certificate also in certificates on that machine. Can somone please help.?

Error -->  The underlying connection was closed: An unexpected error occurred on a send.





Linq2Sql error: "Invalid attempt to call Read when reader is closed."


I've read up on this error from other posts and on other sites, but haven't found a solid resolution to the issue yet. My setup is as follows:

I have a RepositoryBase class that fields certain db calls that all repositories need to perform. In one such call, "GetSecurityGroup", it works most of the time, but will seemingly at random throw an exception with the error "Invalid attempt to call Read when reader is closed." All other Repository classes inherit from this one, and they all use the same DataContext object, which I understand isn't thread safe. Since there could be multiple calls to the DataContext object on the same page, perhaps one is using the DataContext when the next tries to do so. I'm not sure. What can I do to ensure this doesn't happen?

Accordion Control Renders Content Incorrectly


Hey Guys i'm using an accordion control with one pane. In all browsers it renders and works fine - except IE8. in IE8, it looks fine at first, but after collapsing and reopening the pane the text in my pane appears garbled. When i zoom in, i can tell it's in the original font, but it's almost as if it's an image that's blow up too big...

Create databound nested ajax toolkit accordion programatically(In code Behind)


Can anyone guide me in the right direction or give an example of How I would accomplish this?


I have  this so far but kind of stuck on how to do it programtically if I'm using header and content templates 

I have a xmldatasource.. In a nutshell at what point in my code do I need to create a new accordion? does it need to be

in the item_databound handler?


Imports Microsoft.VisualBasic

Public Class AccordionTemplate
    Implements System.Web.UI.ITemplate

    Dim templateType As String

    Sub New(ByVal type As String)
        templateType = type
    End Sub

    Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) _
          Implements System.Web.UI.ITemplate.InstantiateIn

        Dim ph As New PlaceHolder()

        Select Case (templateType)
            Case "Header"
                Dim myLabel As Label = New Label()
                myLabel.Text = "Test"
            Case "Content"
                ph.Controls.Add(New LiteralControl("<p>hello</p>"))
        End Select
    End Sub

End Class



Partial Class Accordion
    Inherits System.Web.UI.Page


An existing connection was forcibly closed by the remote host


I get this message when I try to launch a report (.rdl) from Windows Sharepoint 2007.  I have followed the steps to integrate SQL 2005 SP2 with Sharepoint 2007.  I can launch the report by navigating to "http://server:880/reportserver/.."  I am using a shared datasource that I created within sharepoint.  Any help would be appreciated.

A connection that was expected to be kept alive was closed by the server.


When  i want to Call http://BDCRWSS/_vti_bin/BdcAdminService.svc Bdc AdminService in SharePoint Foundation  2010

the binding i use:

    <binding name="BasicHttpBinding_BusinessDataCatalogSharedService"
      closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00"
      sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false"
      hostNameComparisonMode="StrongWildcard" maxBufferSize="999999"
      maxBufferPoolSize="9999999" maxReceivedMessageSize="999999"
      messageEncoding="Mtom" textEncoding="utf-8" transferMode="Buffered"
     <readerQuotas maxDepth="99" maxStringContentLength="999999" maxArrayLength="999999"
       maxBytesPerRead="999999" maxNameTableCharCount="999999" />
     <security mode="TransportCredentialOnly">
      <transport clientCredentialType="Ntlm" proxyCredentialType="None"
       <extendedProtectionPolicy policyEnforcement="Never" />
      <message clientCredentialType="Use
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend