In an INPUT control, how can one set the initial text in a language-sensitive way ?

R

Radu

Hi. I have an INPUT html control. How can I set the initial "select a
value" type of text in a language-sensitive way ? I have the following
HTML:

<select
class="input"
id="cboSelectScorecardType" size="1"
onfocus="previewFile(this)"
onchange="previewFile(this)"
style="width:400px;
background-position: left top;
background-attachment: scroll;
background-repeat: repeat-x;"
runat="server">
<option><%$ Resources:Scorecards, String19 %></option>
</select>

It does not compile - it says
Error 53 - Literal expressions like
'<%$ Resources:Scorecards, String19 %>'
are not allowed. Use
<asp:Literal runat="server" Text="<%$ Resources:Scorecards,
String19%>" />
instead
but I cannot have a literal control in there.....

I have also tried with
<option><%= Resources:Scorecards, String19 %></option>
and with
<option><%=GetGlobalResourceObject("Scorecards", "String18")%></
option>,
all with no success.

How can one do this ? Thank you very much !
Alex.
 
Y

Yuriy Solodkyy

Hi

<option runat=server Text="<%$ Resources:Scorecards, String19%>">
</option>


Does it work for you?

-yuriy
Hi. I have an INPUT html control. How can I set the initial "select a
value" type of text in a language-sensitive way ? I have the following
HTML:

<select
class="input"
id="cboSelectScorecardType" size="1"
onfocus="previewFile(this)"
onchange="previewFile(this)"
style="width:400px;
background-position: left top;
background-attachment: scroll;
background-repeat: repeat-x;"
runat="server">
<option><%$ Resources:Scorecards, String19 %></option>
</select>
It does not compile - it says
Error 53 - Literal expressions like
'<%$ Resources:Scorecards, String19 %>'
are not allowed. Use
<asp:Literal runat="server" Text="<%$ Resources:Scorecards,
String19%>" />
instead
but I cannot have a literal control in there.....
I have also tried with
<option><%= Resources:Scorecards, String19 %></option>
and with
<option><%=GetGlobalResourceObject("Scorecards", "String18")%></
option>> ,
option>>
 
R

Radu

Hi

<option runat=server Text="<%$ Resources:Scorecards, String19%>">
</option>

Does it work for you?

-yuriy







option>> ,
option>>





- Show quoted text -- Hide quoted text -

- Show quoted text -

Thank you, Yuryi !

It works great, although.... hmmmmm.... it says "Internet Explorer 6 -
Attribute TEXT is not a valid attribute of element Option".... but it
works ! However, with VALUE instead of TEXT it works without any
warnings - I guess IE silently translates TEXT=... to VALUE=...

Thank you again very much !
Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,809
Latest member
moe77

Latest Threads

Top