Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Option statement with string key


Message #1 by "Rola Ali" <rola_ali@h...> on Thu, 25 Jul 2002 07:25:22 +0000

Hi to all,

I have table with string key which name is magname,
I want to list the information associatioed with any magazine on next page,

I use the follwing statment


<%do while not objrs2.eof %>

<option value= <%=(objrs2 ("magname")) %>>
<%=objrs2 ("magname")%>
</option>

<%objrs2.movenext%>

<% loop %>


Now on the nest page when I read the value of the select statament It does 
take just fist word of the string:
example if magazine name is " the global magazine"

It took it as "the" just!!!!!!

Plz help me

thanks in advance



_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

Message #2 by "phil griffiths" <pgtips@m...> on Thu, 25 Jul 2002 11:41:07
If you have spaces in your values then you must embed the value in quotes 
(' or "" will do)
e.g. your html will be ...<option value=the global magazine>
but it needs to be ...<option value='the global magazine'>

(IMHO its good practice to put quotes around all values whether or not 
they have spaces.)

HTH
Phil
>-----------------------------------------------------
> 

Hi to all,

I have table with string key which name is magname,
I want to list the information associatioed with any magazine on next page,

I use the follwing statment


<%do while not objrs2.eof %>

<option value= <%=(objrs2 ("magname")) %>>
<%=objrs2 ("magname")%>
</option>

<%objrs2.movenext%>

<% loop %>


Now on the nest page when I read the value of the select statament It does 
take just fist word of the string:
example if magazine name is " the global magazine"

It took it as "the" just!!!!!!

Plz help me

thanks in advance

  Return to Index