how can we assign id dynamically

Posted by Nishithraj under Regular Expressions on 2/28/2010 | Views : 2270 | Status : [Member] | Replies : 2
Whether we can assign id for a control dynamically? Whether it's possible like as follows (in aspx file)?

id='<%=comboid.ToString()%>'


Mark this as answer, if it is.....

With regards
Nishithraj Narayanan



Responses

Posted by: Vuyiswamb on: 2/28/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Evening

Do you want the id of the control to a variable on the client side?



Thank you for posting at Dotnetfunda
[Administrator]

Nishithraj, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhi2434 on: 2/28/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
No this isnt be possible.

<% is a server side tag. So it will be replaced with the value. If the control is just an html, there is no issue, but for server side controls, you cant specify dynamic id, as responses are generated way after server side objects are created.

:)

www.abhisheksur.com

Nishithraj, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response