How do you get an asp.net control's auto generated name attribute?

Posted by Petras on Stack Overflow See other posts from Stack Overflow or by Petras
Published on 2010-04-15T06:31:23Z Indexed on 2010/04/15 6:33 UTC
Read the original article Hit count: 277

Filed under:
|
|
|
|

I have a DropDownList and need to know its name in the code behind:

<select name="ctl00$cphMainContent$ddlTopic" onchange="javascript:setTimeout('__doPostBack(\'ctl00$cphMainContent$ddlTopic\',\'\')', 0)" id="ctl00_cphMainContent_ddlTopic">
<option value="All">All</option>
</select>

I need to get the value "ctl00$cphMainContent$ddlTopic"

Is that possible?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about webform