Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

RegisterDataItem can only be called during an async postback

$
0
0

Hello, I'm trying to use the popupcontrol from the Ajax Control Toolkit, but I get the following error message:

"RegisterDataItem can only be called during an async postback "

during the call "PopupControlExtender1.Commit(Calendar1.SelectedDate.ToShortDateString());" 

Could anybody help me?

 Thanks in advance!
 

 This is my code:

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %> 

<asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server"></asp:ScriptManager> 

<cc1:CustomDateBox ID="CustomDateBox_DatumBis" runat="server" Width="160px" </cc1:CustomDateBox>
                <ajaxToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server" TargetControlID="CustomDateBox_DatumBis" PopupControlID="Panel1" Position="Bottom" />
                <asp:Panel ID="Panel1" runat="server" CssClass="popupControl">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <center>
                                <asp:Calendar ID="Calendar1" runat="server"
                                    BackColor="White"
                                    BorderColor="#999999"
                                    CellPadding="1"
                                    DayNameFormat="Shortest"
                                    Font-Names="Verdana"
                                    Font-Size="8pt"
                                    ForeColor="Black"
                                    Width="160px"
                                    OnSelectionChanged="Calendar1_SelectionChanged">
                                    <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
                                    <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
                                    <SelectorStyle BackColor="#CCCCCC" />
                                    <WeekendDayStyle BackColor="#FFFFCC" />
                                    <OtherMonthDayStyle ForeColor="#808080" />
                                    <NextPrevStyle VerticalAlign="Bottom" />
                                    <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
                                    <TitleStyle BackColor="#999999" Font-Size="7pt" BorderColor="Black" Font-Bold="True" />
                                </asp:Calendar>
                            </center>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </asp:Panel>

 


Viewing all articles
Browse latest Browse all 5678

Trending Articles



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