Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi all!!

I have an accordion in my page which has two panes AP1 and AP2. When the page loades AP1 is selected as default.AP1 has a textbox for entering emailid along with other controls. I have set emailid column in my database to be unique.now when user has filled all the information in AP1 he moves to AP2. after filling the information in AP2. he clicks on the submitt button which is outside the accordion control.

Now the problem that i am facing is because at the time of submitting AP2 is open and AP1 is closed my

txtEmailId.Focus()

is not working as txtEmailId is in the closed pane.

plz suggest how can i open the pane programatically . I am running out of ideas as always..
Posted

1 solution

Hi,

Example below using Ajax:

In client code:
C#
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<cc1:CollapsiblePanelExtender 
                        ID="CollapsiblePanelExtender1" 
                        runat="server" 
                        CollapseControlID="Panel1" 
                        Collapsed="true" 
                        ExpandControlID="Panel1" 
                        TextLabelID="Label1"  
                        CollapsedText="+"  
                        ExpandedText="-" 
                        ExpandDirection="Vertical" 
                        TargetControlID="panelPatientInfo"  
                        ScrollContents="false">
                    </cc1:CollapsiblePanelExtender>


In your Code behind example:

C#
CollapsiblePanelExtender1.Collapsed = false;


Hope this could help...

Remember to vote if could help...



Regards,
 
Share this answer
 
Comments
ujjwal uniyal 23-Nov-11 7:02am    
hey Moje!!

I used accordion not collapsiblePanelExtender. I have set AccordionPane1 as selected on page load but the time of submitting AccordionPanel2 is Selected by the user.

Can u suggest something about accordion ??

BTW thanks for the help

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