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 中禁用日历控件的自动回发
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- 如何用自己压缩一个 IEnumerable 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 输入按键事件处理程序 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
