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 中禁用日历控件的自动回发
基础教程推荐
- C# 9 新特性——record的相关总结 2023-04-03
- 获取C#保存对话框的文件路径 2022-01-01
- 将数据集转换为列表 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- 从 C# 控制相机设备 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 如果条件可以为空 2022-01-01
