简体   繁体   English

从中继器asp.net获取数据

[英]Obtaining Data From Repeater asp.net

I am an amateur as far as asp.net is concerned. asp.net而言,我是一个业余爱好者。 What I'm trying to do is that I have a repeater control in my page that is set to show data upon selection of an item in a radio button list. 我想做的是在页面中有一个转发器控件,该控件设置为在单选按钮列表中选择一个项目时显示数据。

Upto this point its all good, next what I have to do is: I want a book now button for each repeater item which I can do as well. 到现在为止,这都是一件好事,接下来我要做的是:我想要一个我现在可以做的每个中继器项目的立即预订按钮。

But the question is: after user clicks book now how do I know which repeater item user has clicked? 但是问题是:用户单击书本后,我如何知道用户单击了哪个中继器项目? And how do I get the h_id(unique id of the table that repeater shows data of) of that item so that I can do further operations. 以及如何获取该项目的h_id(转发器显示其数据的表的唯一ID),以便我可以进行进一步的操作。

您可以在转发器中有一个按钮或链接,其中一个Eval(“ ID”)作为其命令参数,然后在回发时使用该值-ala http://www.aspsnippets.com/Articles/ASPNet-Repeater-Get-Item- ItemIndex-CommandName-和CommandArgument-on-Click-Events.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM