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 中禁用日历控件的自动回发
基础教程推荐
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- WPF 模态进度窗口 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
