more spcifically to
<asp:TextBox ID="tb_endDate"
Main Topics
Browse All TopicsHi experts,
i am making a leave application form formatted with html tables.
i have 2 text box intended to capture the start date and end date of the leave application via calendar extender(ajax toolkit). I also have a label field which is intended to display the calculated numbers of day as the user input the date into the textbox using the calendar. I already have the functions that is able to calculate and change the value the label to reflect the calculated time span in terms of number of days.
i wish to be able to trigger an update to a label field when user input into textbox using calendar extender. for example when user input values into the textbox using the ajax calendar, it will be able to detect that something had been inputted into the textbox and call the function to calculate the number of days and update the label field. i am trying to use an update panel and set the triggers to the 2 textbox but doesn't know the right way to do it, please provide assistance in c#.
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi
I have set up an example that does pretty much the same functionality I think you are trying to achieve
Here is the markup
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:TextBox ID="txtCalTest" runat="server"
ontextchanged="txtCalTest_
<cc1:CalendarExtender ID="calTest" runat="server" TargetControlID="txtCalTes
</cc1:CalendarExtender>
<br />
<br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="lblCalChanged" runat="server" Text=""></asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="txtCalTest" EventName="TextChanged"/>
</Triggers>
</asp:UpdatePanel>
</div>
</form>
And the code behind......
protected void txtCalTest_TextChanged(obj
{
lblCalChanged.Text = "CalanderChanged to " + txtCalTest.Text;
}
Hope this helps
cheers
Business Accounts
Answer for Membership
by: burakiewiczPosted on 2009-10-12 at 09:56:09ID: 25552831
i think you need to add the handler for the text changed so it fires xtChanged" and just have an empty handler in the code behind
ontextchanged="TextBox1_Te