ASP.Net Calander Control Visibility问题 [英] ASP.Net Calander Control Visibility problem

查看:65
本文介绍了ASP.Net Calander Control Visibility问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在myasp.net表单中添加了日历控件,并使用visible属性禁用了它。但是,当textbox_textchanged和我按照下面这样做时,我希望看到它真实!



I have added a calender control to myasp.net 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;
        }





但它没有显示,我不知道该怎么办!



更新了Calander Control HTML代码



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" />
                    </asp:Calendar>

推荐答案

您是否将TextBox属性AutoPostBack设置为true?尝试这似乎它没有设置为true默认为false,那是因为它没有触发此事件。
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.


它不是使用日历的有效方法,使用ajax工具包日历控件,按照我给出的链接



http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/Calendar/Calendar.aspx [ ^ ]



如果您想以自己的方式使用,请设置文本框的Autopostback属性是的。
Its is not the effective way to use the calender , use ajax toolkit calender control , follow the link i''ve given

http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/Calendar/Calendar.aspx[^]

If you wan to use in your manner set Autopostback property of textbox true.


好的我已经成功地使用了JQuery http: //jquery.com/ [ ^ ]所以问题解决了!无论如何,谢谢你的帮助!
Ok guys I have successfully abled to use JQuery http://jquery.com/[^] so the problem was solved ! Thanks for the help anyway!


这篇关于ASP.Net Calander Control Visibility问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆