Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Closed Issue: DropDownList in Tab (TabPanel) Not Working [21110]

$
0
0
I've been trying out the controls that are offered in Ajax Tool Kit and have been very impressed with each feature so far.
While trying out the Tab Control I found a bit of a problem.

I added a TabContainer to my page, and two TabPanels within it.
In the second TabPanel I added an ASP DropDownList with some values.
When a postback to the server takes place, the value selected in the DropDownList never makes it to the server.
The selected index always remains 0.


If you want to see what I'm talking about, here is my ASP code:
==============================================================================================

<cc2:TabContainer ID="TabContainer1" runat="server" >
<cc2:TabPanel ID="fistTab" HeaderText="Page1" runat="server">
<ContentTemplate>

<asp:panel ID="GreetingSection" runat="server">
<asp:TextBox ID="personsName" runat="server"></asp:TextBox>
<asp:Button ID="showGreeting" runat="server" text="Greet"/><br />
<asp:Label ID="greeting" runat="server"></asp:Label>
</asp:panel>


</ContentTemplate>
</cc2:TabPanel>
<cc2:TabPanel ID="secondTab" HeaderText="Page2" runat="server" >
<ContentTemplate>
<asp:DropDownList ID="someList" runat="server" EnableViewState="true">
<asp:ListItem Text="1" Value="1"></asp:ListItem>
<asp:ListItem Text="2" Value="1"></asp:ListItem>
<asp:ListItem Text="3" Value="1"></asp:ListItem>
</asp:DropDownList>
<cc2:Accordion ID="Accordion1" runat="server">
<Panes>
<cc2:AccordionPane ID="AccordionPane1" runat="server">
<Header>Pane 1</Header>
<Content>
<asp:panel ID="GreetingSection2" runat="server">

<asp:TextBox ID="personsName2" runat="server"></asp:TextBox>
<asp:Button ID="showGreeting2" runat="server" text="Greet"/><br />
<asp:Label ID="greeting2" runat="server"></asp:Label>
</asp:panel>
</Content>
</cc2:AccordionPane>
<cc2:AccordionPane ID="AccordionPane2" runat="server">
<Header>Pane 2</Header>
<Content>Content for Accordion 2</Content>
</cc2:AccordionPane>
</Panes>
</cc2:Accordion>
</ContentTemplate>
</cc2:TabPanel>
</cc2:TabContainer>

==============================================================================================

And here is my Server Side Code:
==============================================================================================

Private _selectedIndex As Integer

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'The selected index is always 0
_selectedIndex = someList.SelectedIndex
End Sub

Private Sub showGreeting_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles showGreeting.Click
Dim proxy As New localhost.Service1
greeting.Text = proxy.Greeting(personsName.Text)
End Sub

Private Sub showGreeting2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles showGreeting2.Click
Dim proxy As New localhost.Service1
greeting2.Text = proxy.Greeting(personsName2.Text)
End Sub


Any ideas on how to get around this problem would be greatly appreciated.

Thanks :)
Comments: This ticket was filed for a pre-15.1 version of AJAX Control Toolkit. If this is still an issue in v15.1 or later, please create a new inquiry.

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>