显示Asp.net AJAX Calendar Extender的两种方式
发布时间:2020-12-16 07:26:51 所属栏目:asp.Net 来源:网络整理
导读:有没有办法设置日历扩展器,以便在文本框收到焦点时显示日历,何时单击带有“PopupButtonID”的元素?使用我当前的设置,它似乎是一个或另一个. 解决方法 这样做有点丑陋,但如果你准备使用两个扩展器,你可以这样做. asp:TextBox runat="server" ID="DateTextBox
有没有办法设置日历扩展器,以便在文本框收到焦点时显示日历,何时单击带有“PopupButtonID”的元素?使用我当前的设置,它似乎是一个或另一个.
解决方法
这样做有点丑陋,但如果你准备使用两个扩展器,你可以这样做.
<asp:TextBox runat="server" ID="DateTextBox" /> <asp:ImageButton runat="server" ID="CalendarImageButton" ImageUrl="~/date_16x16.gif" /> <ajaxtoolkit:CalendarExtender runat="server" id="Extender1" TargetControlID="DateTextBox"/> <ajaxtoolkit:CalendarExtender runat="server" ID="Extender2" TargetControlID="DateTextBox" PopupButtonID="CalendarImageButton" /> 这样,无论您是专注于文本框还是单击图像按钮,都会显示日历. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc-3 – @ Html.TextBoxFor文本框在验证失败后未突
- asp.net-mvc-3 – 工作单元和存储库模式是打算一起使用还是
- asp.net-mvc – Kendo UI Grid一次只扩展一行
- 晚绑定场景下对象属性赋值和取值可以不需要PropertyInfo
- .net – MVC – 是模型查看还是控制器查看?
- 用 C# 写一个 Redis 数据同步小工具
- 如何使用IIS 6在asp.net中实现远期未来的过期标头
- 不同的asp.net Web服务和Ihttphandler
- asp.net – 模型绑定 – Nullable decimal和double默认为0而
- asp.net-core – 从与xproj相同的解决方案引用csproj