is it possible to set a web control's "ID" property programatically?
for instance?
Dim myControlId As String
myControlId = "idWhatever"
.
.
.
.
<asp:button id='<%# myControlId%>' ....
by the way this code does not work.You can write out an html element and modify it's id like you did above and just do things 'the old way'.
You can set some properties like visible and text like this however:
mycontrol.visible = false
mycontrol.text = "hi"
You might try using id
like
mycontrol.id = something
the trouble is mycontrol would be the existing id.
for instance?
Dim myControlId As String
myControlId = "idWhatever"
.
.
.
.
<asp:button id='<%# myControlId%>' ....
by the way this code does not work.You can write out an html element and modify it's id like you did above and just do things 'the old way'.
You can set some properties like visible and text like this however:
mycontrol.visible = false
mycontrol.text = "hi"
You might try using id
like
mycontrol.id = something
the trouble is mycontrol would be the existing id.