简体   繁体   English

尝试从中继器内部获取ID

[英]Trying to fetch ID from inside of repeater

Inside a repeater there's a list of addresses ..when address link button is clicked, the address is shown inside of text boxes above repeater with all text boxes greyed out and an Edit button is rendered on the page OUTSIDE the repeater and below the text boxes..Now how do I edit this address ? 在转发器内部有一个地址列表。单击地址链接按钮时,该地址显示在转发器上方的文本框中,所有文本框均显示为灰色,并且在转发器外和该文本框下方的页面上显示一个“编辑”按钮..现在如何编辑该地址?

I need the AddressID of the address that has been clicked inside the repeater... 我需要在转发器内单击的地址的AddressID ...

when Address link is clicked,DisplayAddress command event is fired inside of repeater's ITemCommand so what I did was assigned "AddressID" generated(when Adress link was clicked inside repeater) to a globally decalred string variable and tried to use that inside my Edit Button's click event so as to fill the Datasource(Method used to fill data source requires AddressID) and do stuff...didnt work 单击“地址”链接时,在转发器的ITemCommand内触发DisplayAddress命令事件,因此我所做的工作被分配给“全局地址”字符串变量(在转发器内部单击“地址”链接时)“ AddressID”,并尝试在“编辑”按钮的单击中使用它事件以填充数据源(用于填充数据源的方法需要AddressID)并进行操作...工作

我将ID存储在Viewstate中。

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

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