Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Contents of combo box are being chopped if it has a comma or space...

Status
Not open for further replies.

SrkrReds

Programmer
Dec 17, 2001
36
US
Hello all:
I am having a problem with posting contents of a combo box(cmbName) on asppage1(that contains names in the form of doe, jane . Ex: I am searching for records added by a user. After I select the user's name and click on a submit button which opens another asp page asppage2, filtering the records added by the selected user name on asppage1. This was not working, so I printed out the passed content, as below on asppage2
Response.write Request.Form("cmbName")
Only doe is printed.

This is for both a comma or space in the contents of combo box.

Any help is appreciated
thanx in advance
 
can you post the code you use to define your combo box?
 
Here is the code for combo box

Do until rstAny.EOF
Response.Write &quot;<OPTION VALUE=&quot; & rstAny (&quot;OriginatorID&quot;) & &quot;>&quot; & rstAny(&quot;OriginatorID&quot;) & &quot;</OPTION>&quot;
rstAny.MoveNext
Loop



thanx
 
Try:

Response.Write &quot;<OPTION VALUE=&quot;&quot;&quot; & rstAny(&quot;OriginatorID&quot;) & &quot;&quot;&quot;>&quot; & rstAny(&quot;OriginatorID&quot;) & &quot;</OPTION>&quot;

I think you're losing the integrity of your variable value by not enclosing it in quotes.
 
actually, let me clarify that a little bit, i don't &quot;think&quot; you are losing the data integrity, i &quot;know&quot; you are, because you will only take the value up to the first space it encounters if the value is not enclosed in quotes.

so doe, jane becomes just doe.

&quot;doe, jane&quot; would remain &quot;doe, jane&quot;

common error.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top