Set dropdownlist item text using server side method
Posted
by Blankman
on Stack Overflow
See other posts from Stack Overflow
or by Blankman
Published on 2010-05-13T13:50:47Z
Indexed on
2010/05/13
13:54 UTC
Read the original article
Hit count: 167
I am trying to set the Text property of a drop down list option like this:
<asp:ListItem Value="AB" Text='<%= Resources.Get("USA") %>'></asp:ListItem>
But it isn't working, instead the Text value is literally <%= Resources.Get("USA") %>
and not the string "USA".
i.e. it is not being interpreted as code.
What is the problem?
© Stack Overflow or respective owner