图片点击时Calendar控件未弹起 [英] Calendar control is not popping-up when clicked on image

查看:185
本文介绍了图片点击时Calendar控件未弹起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是&LT的帮助下 CalendarExtender 控制; IMG> 来填充文本框与日期。我在 EditItemTemplate中使用 GridView控件这一点。但是,当我点击图片,日历控件不坡平了。

I'm using a CalendarExtender control with the help of <img> to populate a TextBox with a date. I am using this in EditItemTemplate of GridView. But when I click on the image, the calendar control is not poping up.

我已经用在四个或五个其他地方(这个项目)也是本 CalendarExtender 控制。其他地方它工作正常。我比较从油井工作版本这个code中的code。没有区别的。

I have used this CalendarExtender control in four or five other places (in this project) also. Everywhere else it is working fine. I have compared the code from the well working version to this code. No difference at all.

我已经写了code象下面这样:

I have written the code like below:

<EditItemTemplate>
    <asp:TextBox ID="txtDateDelivered" runat="server" 
                 Text='<%# Bind("DateDelivered","{0:dd/MM/yy}") %>' 
                 CssClass="DateTextBoxInGridView" >
    </asp:TextBox>
    <asp:CalendarExtender ID="calexDateDelivered" runat="server" 
                          Format="dd/MM/yy" 
                          TargetControlID="txtDateDelivered"
                          PopupButtonID="calDateDelivered">
    </asp:CalendarExtender>
    <img src="Images/calendar.gif" 
         id="calDateDelivered" 
         alt="Calendar" />
</EditItemTemplate>

有人能告诉那里可能是问题?

Can anybody please tell where could be the problem?

推荐答案

你所使用的图像标签是不是服务器控件。
这是简单的HTML控件,这就是为什么日历控件不reconise这个图像控制的原因。

The image tag which you have used is not a server control. It is simple html control, this is the reason why the calender control does not reconise this image control..

尝试使用asp.net图像按钮在这里吧。
它应该工作,然后。

Try using asp.net image button over here instead of . It should work then.

欢呼声......

拉​​胡尔℃。

这篇关于图片点击时Calendar控件未弹起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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