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

Created Issue: Updatepanel + TabControl incorrect behaviour [27347]

$
0
0
Well if you create a update panel outside of a tabcontrol and place a trigger for the "ActiveTabChanged" event.

All postbacks inside the tabpanel are corrupted (the code on the server runs but no postback happens...)
Aspx file:
```
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</ajaxToolkit:ToolkitScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="TabContainer1" EventName="ActiveTabChanged" />
</Triggers>
<ContentTemplate>
<asp:Label ID="timeLabel" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
<ajaxToolkit:TabContainer ID="TabContainer1" runat="server">
<ajaxToolkit:TabPanel id="TabPanel1" runat="server" HeaderText="First">
<ContentTemplate>
<asp:Button ID="saveButton" runat="server" Text="Save" />
<asp:Label ID="savedLabel" runat="server" />
</ContentTemplate>
</ajaxToolkit:TabPanel>
<ajaxToolkit:TabPanel id="TabPanel2" runat="server" HeaderText="Second">
<ContentTemplate>
</ContentTemplate>
</ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer>
```
aspx.vb
```
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
timeLabel.Text = Date.Now.ToString()
End Sub

Private Sub TabContainer1_ActiveTabChanged(sender As Object, e As System.EventArgs) Handles TabContainer1.ActiveTabChanged

End Sub

Private Sub saveButton_Click(sender As Object, e As System.EventArgs) Handles saveButton.Click
savedLabel.Text = Date.Now.ToString() + " - Saved!"
End Sub
```

Viewing all articles
Browse latest Browse all 4356

Trending Articles



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