Ajax日历问题(页面已重新加载) [英] Ajax calender problem (page is reload)

查看:56
本文介绍了Ajax日历问题(页面已重新加载)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<asp:TextBox ID="txtDOB" runat="server" AutoPostBack="True" /><asp:CalendarExtender ID="c1" runat="server" TargetControlID="txtDOB" PopupButtonID="imgCal"></asp:CalendarExtender>
<asp:ImageButton ImageUrl="~/Images/Calendar.png" ID="imgCal" runat="server" />
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>


这段代码说明笔记工作正常.单击图像即可重新加载页面.


This code is note working properly. Page is reloading on click of image.

推荐答案

您正在使用ImageButton.它的默认行为是提交页面,从而提交回发.如果您只需要一个图像,单击它不会发生任何反应,那么我认为您需要一个Image控件而不是ImageButton.
You are using an ImageButton. It''s default behaviour is to submit the page and thus the postback. In case you need just an image, on click of which nothing happens, then I think you need an Image control and not ImageButton.


这篇关于Ajax日历问题(页面已重新加载)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆