如何从转发器控件中获取选定的行值 [英] How to Get selected row value from repeater control

查看:84
本文介绍了如何从转发器控件中获取选定的行值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部



这里我遇到了Repeater控件的问题,我没有在转发器中使用任何控件,所以如何从行中获取行值由用户选择



谢谢!

Hi, All

Here i am facing problem with Repeater control, i am not using any control in repeater, so how can i get the row value from row which selected by user

Thank You !

推荐答案

Repeater控件不公开DataKeys。您可能无法从Repeater控件中获取选定的行值而没有任何控件,而是您可以使用复选框和隐藏字段



这里有一个示例:



http://forums.asp.net/p/ 1257926 / 2345904.aspx [ ^ ]
The Repeater control does not expose DataKeys. You may not get selected row value from the Repeater control without having any controls in it rather you can use checkbox and hidden field

here is an example of that:

http://forums.asp.net/p/1257926/2345904.aspx[^]


您必须放置一个Button或其他东西并处理 ItemCommand 事件。在该活动中,您可以获得所选行详细信息。



否则您可以附加一个 onclick 客户端事件在Repeater Row和JavaScript事件中,您可以获得该行的详细信息。
Either you have to put a Button or something and handle the ItemCommand Event. Inside that event, you can get the Selected Row details.

Else you can attach one onclick client side event to the Repeater Row and inside that JavaScript Event, you can get the details of the row.


这篇关于如何从转发器控件中获取选定的行值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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