图片按钮onclick事件在用户控件中不起作用 [英] Image button onclick event is not working in user control

查看:102
本文介绍了图片按钮onclick事件在用户控件中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在数据列表中有图像按钮...我在用户控件中使用了此数据列表...

i have image button in datalist ...i have used this datalist in user control...

图像按钮onclick事件在用户控件中不起作用...

image button onclick event is not working in user control......

plz提示出了什么问题...

plz suggest whats going wrong...

 

感谢thanx

推荐答案

您的项目中没有一个图像按钮,您有很多图像按钮都是由数据列表创建的,而不是您自己创建的.

You don''t have one image button in your project, you have many, all created by the datalist, not by you.

您将需要处理数据列表的OnItemCommand方法,以便能够响应所有这些事件的click事件.我注意到,有两篇文章引用了OnItemCommand(一种MSFT的所有数据绑定控件都使用的方法,并且值得一读),就在CP上

You will need to handle the datalist OnItemCommand method to be able to respond to the click event of all of them. I note that there are two pages of articles that reference OnItemCommand ( a method used by all of MSFT''s databound controls, and one well worth understanding) right here on CP 


这篇关于图片按钮onclick事件在用户控件中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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