473,322 Members | 1,403 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,322 software developers and data experts.

Dynamic drop down list problem

Hello,

I have an asp application which I made "Multilanguage". I made an asp file
for every language with all the strings to be used stored like this:

Langstring1 = "French"
Langstring20 = "VTest"

In the beginning of an asp file I determine which language file to include.
In my database there are only numbers. I can now display the right text in
the right language using respons.write: Response.write(Langstring20)

Now I want to use a dropdown box displaying a text as selected based on a
relation between the number in my database and my language files. When I
have number 20 in a database, the value of the option should be 20 and the
text displayed should be 'VTest' for this is Langstring20. Problem is that
the option value seems to be correct with what I do, but the text displayed
in the box is not correct. How can I solve this?

What I did was the following:

------------------------------------------------
Langstring = "Langstring"

<select name="Testbox">
<option value="<%=RSItems("Testfile")%>"
selected><%=response.write(Langstring&RSItems("Tes tfile"))%>
<option value="20">VTest
<option value="21">TTest
<option value="22">FTest
</select>
----------------------------------------

What did I do wrong?
Jul 19 '05 #1
3 1354
Looks like you try to use "dynamic" variables ???

Response.Write(langstring&rsitems("TestFile")) will write what is in the
langstring variable followed but what is in the rstitems("testfile"). Is
this what you experience ?

Patrice

--

"Jochen" <jo************@pandora.be> a écrit dans le message de
news:zu**********************@phobos.telenet-ops.be...
Hello,

I have an asp application which I made "Multilanguage". I made an asp file
for every language with all the strings to be used stored like this:

Langstring1 = "French"
Langstring20 = "VTest"

In the beginning of an asp file I determine which language file to include. In my database there are only numbers. I can now display the right text in the right language using respons.write: Response.write(Langstring20)

Now I want to use a dropdown box displaying a text as selected based on a
relation between the number in my database and my language files. When I
have number 20 in a database, the value of the option should be 20 and the
text displayed should be 'VTest' for this is Langstring20. Problem is that
the option value seems to be correct with what I do, but the text displayed in the box is not correct. How can I solve this?

What I did was the following:

------------------------------------------------
Langstring = "Langstring"

<select name="Testbox">
<option value="<%=RSItems("Testfile")%>"
selected><%=response.write(Langstring&RSItems("Tes tfile"))%>
<option value="20">VTest
<option value="21">TTest
<option value="22">FTest
</select>
----------------------------------------

What did I do wrong?

Jul 19 '05 #2
Indeed, that's what I experience

"Patrice" <no****@nowhere.com> wrote in message
news:Of****************@TK2MSFTNGP14.phx.gbl...
Looks like you try to use "dynamic" variables ???

Response.Write(langstring&rsitems("TestFile")) will write what is in the
langstring variable followed but what is in the rstitems("testfile"). Is
this what you experience ?

Patrice

--

"Jochen" <jo************@pandora.be> a écrit dans le message de
news:zu**********************@phobos.telenet-ops.be...
Hello,

I have an asp application which I made "Multilanguage". I made an asp
file
for every language with all the strings to be used stored like this:

Langstring1 = "French"
Langstring20 = "VTest"

In the beginning of an asp file I determine which language file to

include.
In my database there are only numbers. I can now display the right text

in
the right language using respons.write: Response.write(Langstring20)

Now I want to use a dropdown box displaying a text as selected based on a
relation between the number in my database and my language files. When I
have number 20 in a database, the value of the option should be 20 and
the
text displayed should be 'VTest' for this is Langstring20. Problem is
that
the option value seems to be correct with what I do, but the text

displayed
in the box is not correct. How can I solve this?

What I did was the following:

------------------------------------------------
Langstring = "Langstring"

<select name="Testbox">
<option value="<%=RSItems("Testfile")%>"
selected><%=response.write(Langstring&RSItems("Tes tfile"))%>
<option value="20">VTest
<option value="21">TTest
<option value="22">FTest
</select>
----------------------------------------

What did I do wrong?


Jul 19 '05 #3
Ok this is exactly what the code means. You could use "Eval" to evaluate the
expression.
THAT SAID, I would avoid using "dynamically named" variables which is bad
IMO.

If you still want something similar you could use an array instead with one
dimension for the language and the other for the string id.

See :
http://msdn.microsoft.com/library/de...sVariables.asp
at the bottom of the page.

Patrice

--

"Jochen" <jo************@pandora.be> a écrit dans le message de
news:HV***********************@phobos.telenet-ops.be...
Indeed, that's what I experience

"Patrice" <no****@nowhere.com> wrote in message
news:Of****************@TK2MSFTNGP14.phx.gbl...
Looks like you try to use "dynamic" variables ???

Response.Write(langstring&rsitems("TestFile")) will write what is in the
langstring variable followed but what is in the rstitems("testfile"). Is
this what you experience ?

Patrice

--

"Jochen" <jo************@pandora.be> a écrit dans le message de
news:zu**********************@phobos.telenet-ops.be...
Hello,

I have an asp application which I made "Multilanguage". I made an asp
file
for every language with all the strings to be used stored like this:

Langstring1 = "French"
Langstring20 = "VTest"

In the beginning of an asp file I determine which language file to

include.
In my database there are only numbers. I can now display the right text
in
the right language using respons.write: Response.write(Langstring20)

Now I want to use a dropdown box displaying a text as selected based on

a relation between the number in my database and my language files. When I have number 20 in a database, the value of the option should be 20 and
the
text displayed should be 'VTest' for this is Langstring20. Problem is
that
the option value seems to be correct with what I do, but the text

displayed
in the box is not correct. How can I solve this?

What I did was the following:

------------------------------------------------
Langstring = "Langstring"

<select name="Testbox">
<option value="<%=RSItems("Testfile")%>"
selected><%=response.write(Langstring&RSItems("Tes tfile"))%>
<option value="20">VTest
<option value="21">TTest
<option value="22">FTest
</select>
----------------------------------------

What did I do wrong?



Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: C White | last post by:
I'm trying to write an asp script that will create a series of drop lists based on a table like: canada ontario toronto street name link canada ontario toronto road...
3
by: pmud | last post by:
Hi, I have 2 drop down lists on an asp.Net page. The 1st contains alphabets. When the user selects an alphabet frm the first list, the second drop down list should be populated with names from...
1
by: ayende | last post by:
Okay, I'm pretty sure that I'm doing everything right here, but something is very wrong in the result. I've a page that has a drop down list (with auto-post-back = true) and a place holder. ...
6
by: mcgrew.michael | last post by:
I hope this is the right group. I am very new to ASP so this is probably a stupid question. I have some vbscript that query's AD and populates a recordset. I know the recorset contains the...
0
by: cindy | last post by:
I have a dynamic datagrid. I have custom classes for the controls public class CreateEditItemTemplateDDL : ITemplate { DataTable dtBind; string strddlName; string strSelectedID; string...
2
by: Jim Gregg | last post by:
Hello all, I am faced with some logic that I am unsure how to handle. Imagine that I am running a WMI query and I am outputting the data into a dynamically created ASP table control. Here is my...
4
by: phcmi | last post by:
I have a PropertyGrid question. My task is to replace a legacy dialog box presentation with a modern one. The dialog itself allows the user to set configuration settings in our application, so...
9
by: Tarscher | last post by:
hi all, I have this seemingly simple problem. I have lost a lot of time on it though. When a user selects a value from a dropdownlist (static control) a dynamic control is generated. I have...
2
by: chobo | last post by:
Hi, I am trying to make a dynamic menu using javascript and an xml file. The structure of the page (test.html) is in the code below. When I load up the page the drop-down list is there, so I select a...
4
by: audreyality | last post by:
I am new to javascript and appreciate any guidance on this issue, so thank you in advance for your advice! Situation: I am working with a form that will send information to a database. I need the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.