CalendarExtender postback problem

Posted by senzacionale on Stack Overflow See other posts from Stack Overflow or by senzacionale
Published on 2010-05-31T19:15:11Z Indexed on 2010/05/31 19:23 UTC
Read the original article Hit count: 770

Filed under:
 <asp:TextBox ID="txtDate" runat="server" AutoPostBack="true" OnTextChanged="txtDate_TextChanged"></asp:TextBox>
<asp:CalendarExtender ID="txtDate_CalendarExtender" runat="server" Enabled="True"
TargetControlID="txtDate" Format="dd.MM.yyyy">
</asp:CalendarExtender>

i am using Calendarextender and i OnTextChanged event. In C# code (Page_Load) i am calling

txtDate.Text = DateTime.Today.ToShortDateString();

becouse of this i get postback after page is loaded (page is loaded 2 times). How can i prevent postbak in calendar extender after page is loaded for first time?

© Stack Overflow or respective owner

Related posts about c#