473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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
2 1387
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Joe Helmick | last post by:
This one has me really stumped, so I thought I'd ask publicly. I was trying to take my ASP.NET web page "template" -- banner graphic, small navigation bar, and user feedback message area -- and...
8
by: Calan | last post by:
I have a server-side ASP script that dynamically creates an input form from a database table. The table contains a field name, the table where values are stored, type of input control, value for a...
8
by: Michael Hill | last post by:
I have this input element: <input type='text' name='street' maxlength='20' size='20'> that I only want the user to be able to input to based on a item from a select list: <select...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
3
by: BJ | last post by:
Ever see those nifty sites that allow you to type text into a single or multi line text box and decrement from the maximum number of characters to 0? This lets the user know they are approaching...
1
by: John_H | last post by:
Re: ASP.NET 2.0 I would like suggestions or code examples on how to collect a variable length list of input data (item# & item quantity specifically). I thought that I could accomplish this...
9
by: Jaybuffet | last post by:
my aspx has something like this <asp:Repeater id="Repeater1" runat="server"> <ItemTemplate> <mycontrol:ctl id="ctlId" obj='<%# Container.DataItem %>' showItem="true"/> </ItemTemplate>...
3
by: aurora | last post by:
This is an entry I just added to ASPN. It is a somewhat novel technique I have employed quite successfully in my code. I repost it here for more explosure and discussions. ...
1
by: differentsri | last post by:
THIS IS AN ASP.NET 1.1 APPLICATION IAM TRYING TO UPDATE THE FIELD BUT I AM NOT ABLE TO UPDATE IT? CAN U TELL THE REASON ? IT IS GIVING THE FOLLOWING ERROR BELOW I HAVE ALSO GIVEN THE CODE OF...
4
by: =?Utf-8?B?UmljaEI=?= | last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I would like to dynamically add panes to the control with a form template added when the pane is added. I have tried...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.