By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,969 Members | 1,522 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,969 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.

Jun 11 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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>>
all with no success.

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

Jun 11 '07 #2

P: n/a
On Jun 11, 3:31 pm, Yuriy Solodkyy <y.dot.solod...@gmail.comwrote:
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>>
all with no success.
How can one do this ? Thank you very much !
Alex.- Hide quoted text -

- 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

Jun 11 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.