get generated id of a control?

  • Thread starter Thread starter soni2926
  • Start date Start date
S

soni2926

hi,
in .net when i have a hyperlink control in a datagrid, i set it's ID
on the page to Hyperlink1. but when i check it's ID when viewing the
source of the web page i get this:
dg_ctl02_Hyperlink1
isn't there someway to know what .net generated before the ID i put in
the code, i mean this part:
dg_ctl02_
 
Well, if you do like most people, you simply add the dg_ctl02_ in a hard
coded manner. ;-)

Mark has already answered the correct way. While you are still server side,
pull the ClientID.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
 
Back
Top