Saturday, March 24, 2012

ASP not working inside of Accordian.

I am having an issue I am using an accordian sort of like a popup more options menu. I added some drop down boxes inside an accordian and it displays fine and shows the values. But when I try to build a function to send the drpVariable.SelectedValue is set to null. It seems that the default.aspx.cs does not capture the selected value inside the accordian. Does anyone know a work around this? Below is an example of some of the code

<

cc1:AccordionID="Accordion1"runat="server"AutoSize="Limit"style="z-index: 101; left: 845px; position: relative; top: -349px"Height="370px"Width="134px"><Panes><cc1:AccordionPaneID="dummy"runat="server"></cc1:AccordionPane><cc1:AccordionPaneID="apMsgSearchOptions"runat="server"><Header><ahref=""onclick="return false;">Search Options</a></Header></cc1:AccordionPane><cc1:AccordionPaneID="apMsgAdvancedSearch"runat="server"><Header><ahref=""onclick="return false;">Advanced Search</a></Header><Content><asp:LabelID="lblMsgKeyClient"runat="server"Text="Client"/><br/><asp:TextBoxID="txtMsgKeyClient"Width=45pxEnabled="false"MaxLength="5"runat="server"/><br/><asp:LabelID="lblMsgKeyStartDate"runat="server"Text="Start Date"/><br/><asp:TextBoxID="txtMsgKeyStartDate"Width=45pxEnabled="false"runat="server"/><br/><asp:LabelID="lblMsgKeyEndDate"runat="server"Text="End Date"/><br/><asp:TextBoxID="txtMsgKeyEndDate"Width=45pxEnabled="false"runat="server"/><br/><asp:LabelID="lblMsgKeyMsgCategory"runat="server"Text="Msg Category"/><br/><asp:DropDownListID="drpMsgKeyMsgCategory"runat="server"Width="50px"><asp:ListItemSelected="True"></asp:ListItem><asp:ListItem>A</asp:ListItem><asp:ListItem>B</asp:ListItem><asp:ListItem>C</asp:ListItem><asp:ListItem>D</asp:ListItem><asp:ListItem>E</asp:ListItem><asp:ListItem>F</asp:ListItem><asp:ListItem>Z</asp:ListItem><asp:ListItem>1</asp:ListItem><asp:ListItem>2</asp:ListItem><asp:ListItem>3</asp:ListItem><asp:ListItem>4</asp:ListItem></asp:DropDownList><br/><asp:LabelID="lblMsgKeyMsgType"runat="server"Text="Message Type"/><br/><asp:DropDownListID="drpMsgKeyMsgType"runat="server"Width="75px"><asp:ListItemSelected="True"Value="H">Hour</asp:ListItem><asp:ListItemValue="5">5 Min</asp:ListItem><asp:ListItemValue="1">1 Min</asp:ListItem></asp:DropDownList><br/><asp:LabelID="lblMsgKeyProductCode"runat="server"Text="Product Code"/><br/><asp:DropDownListID="drpMsgKeyProductCode"runat="server"Width="75px"><asp:ListItemSelected="True"></asp:ListItem><asp:ListItem>DMS</asp:ListItem><asp:ListItem>RTDS</asp:ListItem><asp:ListItem>XMLM</asp:ListItem></asp:DropDownList><br/><asp:LabelID="lblMsgKeyRequestType"runat="server"Text="Request Type"/><br/><asp:DropDownListID="drpMsgKeyReqType"runat="server"Width="75px"><asp:ListItemSelected="True"></asp:ListItem><asp:ListItemValue="A">Alpha</asp:ListItem><asp:ListItemValue="E">Event</asp:ListItem><asp:ListItemValue="I">Inquire</asp:ListItem><asp:ListItemValue="M">Maint</asp:ListItem><asp:ListItemValue="P">Publish</asp:ListItem><asp:ListItemValue="-">Error</asp:ListItem></asp:DropDownList><br/></Content></cc1:AccordionPane>

Just an update I added a dropdown reading an XML file... and all the drop down boxes worked then. Can anyone explain why it now works and didnt without when all the dropdown had list items.

No comments:

Post a Comment