从htmlbutton提高ItemCommand直放站 [英] Raise ItemCommand in repeater from an htmlbutton

查看:213
本文介绍了从htmlbutton提高ItemCommand直放站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我已标记为RUNAT =服务器ID和在ItemTemplate我转发所有的爵士乐的htmlbutton。当我点击它,即使CommandName的设置,它不会提高对中继ItemCommand事件。

I have an htmlbutton that I have tagged to runat=server with an id and all that jazz in the itemtemplate for my repeater. When I click it, even though CommandName is set, it doesn't raise the ItemCommand event for the repeater.

我需要做一些具体的事情上htmlbutton要做到这一点?

Do I need to do something specific on the htmlbutton to make that happen?

我有在这方面做工精细的项目模板中的其他服务器控件,所以它不是一个回发/数据绑定的问题,但我需要使用htmlbutton语法这种控制对于一些pretty具体原因。

I have other server controls in the item template that work fine in this regard, so it isn't a postback/databinding issue, but I need to use the htmlbutton syntax for this control for some pretty specific reasons.

任何人有什么建议吗?

推荐答案

常规输入按钮没有的 CommandEventHanlder 。你需要Asp.net按钮,ImageButton的或LinkBut​​ton的,为了赶的CommandName内ItemCommand。

Regular input button doesn't have CommandEventHanlder. You need Asp.net Button, ImageButton or LinkButton in order to catch CommandName inside ItemCommand.

这篇关于从htmlbutton提高ItemCommand直放站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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