datagrid question

T

Tariq Ahmad

hi,

i have a templatecolum in my datagrid. the template contains
a hyperlink called "hypFind".

when i run my page and do View|Source each instance
of hypFind has a separate id like this: id="dgRooms__ctl2_hypFind",
id="dgRooms__ctl3_hypFind", id="dgRooms__ctl4_hypFind" etc..

my question is how can i get to this name programmatically in
the ItemDataBound routine???

thanks.

t.
 
C

Chris McKenzie

Try Control.ClientID.

I can't test this right now as I'm not in my environment, but I think it gives you the client ID that it generates for the control that you're interested it.

Chris

hi,

i have a templatecolum in my datagrid. the template contains
a hyperlink called "hypFind".

when i run my page and do View|Source each instance
of hypFind has a separate id like this: id="dgRooms__ctl2_hypFind",
id="dgRooms__ctl3_hypFind", id="dgRooms__ctl4_hypFind" etc..

my question is how can i get to this name programmatically in
the ItemDataBound routine???

thanks.

t.
 
T

Tariq Ahmad

works a treat - thanks!

Try Control.ClientID.

I can't test this right now as I'm not in my environment, but I think it gives you the client ID that it generates for the control that you're interested it.

Chris

hi,

i have a templatecolum in my datagrid. the template contains
a hyperlink called "hypFind".

when i run my page and do View|Source each instance
of hypFind has a separate id like this: id="dgRooms__ctl2_hypFind",
id="dgRooms__ctl3_hypFind", id="dgRooms__ctl4_hypFind" etc..

my question is how can i get to this name programmatically in
the ItemDataBound routine???

thanks.

t.
 

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
474,078
Messages
2,570,570
Members
47,204
Latest member
MalorieSte

Latest Threads

Top