本文介绍了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日历问题(页面已重新加载)
发布评论