Click here to Skip to main content
11,930,231 members (43,931 online)
Rate this:
Please Sign up or sign in to vote.
I have added a calender control to form and I disabled it using the visible property. But Iwant to visible true it when a textbox_textchanged and I did it as the below!

protected void txtDtApp_TextChanged(object sender, EventArgs e)
            clnDates.Visible = true;

But it didn't displayed and I don't know what to do!

Updated Calander Control HTML Code
<asp:Calendar ID="clnDates" runat="server" BackColor="White" 
                        BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest" 
                        Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" Height="180px" 
                        onselectionchanged="clnDates_SelectionChanged" Visible="False" Width="200px">
                        <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
                        <NextPrevStyle VerticalAlign="Bottom" />
                        <OtherMonthDayStyle ForeColor="#808080" />
                        <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
                        <SelectorStyle BackColor="#CCCCCC" />
                        <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
                        <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
                        <WeekendDayStyle BackColor="#FFFFCC" />
Posted 7-May-13 7:56am
Edited 7-May-13 8:55am
learner'sbug 7-May-13 13:12pm
did you try to debug it ?
Chiranthaka Sampath 7-May-13 13:16pm
Yes I debug it but no answer!
learner'sbug 7-May-13 13:24pm
Is it hitting your code on text change?
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Have you set TextBox property AutoPostBack to true? try this it seems that it is not set true default is false,That's by it is not firing this event.
Chiranthaka Sampath 7-May-13 13:32pm
I have done that but the result is the same!
Shriniwas Shukla 7-May-13 13:36pm
As per my understanding you have disable it before this code so you can enable then try to use visible.It may a solution other wise some more code require from you to understand your correct problem.
Chiranthaka Sampath 7-May-13 13:36pm
Ok it took sometime to popup and your suggestion works! Do you have any idea to speedup the popping up the calendar?
Shriniwas Shukla 7-May-13 13:41pm
it may require to review your code.
Chiranthaka Sampath 7-May-13 13:55pm
Question Updated with the Calendar control HTML!
Shriniwas Shukla 8-May-13 9:06am
if all code is running properly then I think you need to check with other browser like IE
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Its is not the effective way to use the calender , use ajax toolkit calender control , follow the link i've given[^]

If you wan to use in your manner set Autopostback property of textbox true.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Ok guys I have successfully abled to use JQuery[^] so the problem was solved ! Thanks for the help anyway!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151126.1 | Last Updated 8 May 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100