To disable autopostback for Calender Control in ASP.net(在 ASP.net 中禁用日历控件的自动回发)
问题描述
我正在尝试使用 System.Web.UI.WebControls.Calender.
Iam trying to use System.Web.UI.WebControls.Calender.
但是当我选择任何日期时,它会自动回发.有什么办法可以避免这种行为.
But when I select any date , It post backs automatically. Is there any way to avoid this behavior.
(我没有看到我设置为 False 以避免这种行为的常用属性 AutoPostback)
(I dont see the usual property AutoPostback which I set to False to avoid this behavior)
我只需要用户提交表单后选择的日期.
I need the selected date only once user submits the form.
注意 - 我使用的是 VS2008
Note- I am using VS2008
推荐答案
我通常避免避免使用 MS 日历控件,因为我发现它很难使用和样式化.你有没有考虑过像 jQuery UI 日期选择器这样的东西,它可以根据你的需要工作并且更容易在之后设置样式.
I generally avoid avoid the MS calender control because I find it so hard to work with and style. Have you considered something like the jQuery UI date picker, works as you need and far easier to style after too.
http://jqueryui.com/demos/datepicker/#inline
这篇关于在 ASP.net 中禁用日历控件的自动回发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 ASP.net 中禁用日历控件的自动回发
基础教程推荐
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
