Problems redirecting record ID to detail page

P

Peter

On my main page I have a datagrid with a hyperlink column. As soon as I
click on the hyperlink a detailed screen should appear where I collect the
fields of the selected record.
However, I have problems transferring the UserID to the detail page.
The ID is stored in a label in a template column and I can't convert it to a
string and redirect to the detail page.
To gather the ID I use the following command :
Label ID = (Label)e.Item.FindControl("lblUserAccountID");

When I inserted a button and add the following code everything works :

Label ID = (Label)e.Item.FindControl("lblUserAccountID"); txtTest.Text =
ID.Text;

But with the hyperlink I can't make it work.

Please help ... thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top