简体   繁体   中英

Passing through a datagrid value

I have a datagrid with 2 columns.

One databound which display names and the other one is a hyperlink column.

Column1 = databound column, Column2 = hyperlink column.

column1:       column2:
---------------------
Name1          Modify 
Name2          Modify 

Next when I click on any of the values in Column2 I simply get redirected to a other page.

This page contains 2 buttons/hyperlinks with Yes or No. (does not mather wich control, which one would bring the most easy to implement solution atm)

When clicked on No it simply redirects back to the original page.

Now the question is when I press "Yes" how exactly do I access "Name1" (or Name2 if i press on the second modify)?

Meaning if I press Yes I want to use this Name for certain opertions (xml).

To put it short if I press on "modify" i want to be able to get that name associated with it (which is already displayed in the first bound column left of it).

So the goal is to use that name in Xpath for example so I can make a query towards that node with that certain name.

我认为跨页面发布是您正在寻找的答案。

HI

you can store the name you want at bind,

for example if you want to send the value as parameter :

<a href='modify.aspx?Value=<%#Container.DataItem("column1")%>'>

i hope this will work, and if this is not what you are tying to do please let me know

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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