Forums

ASP

This topic is locked

problems with concatenation of strings

Posted 21 Feb 2002 18:43:25
1
has voted
21 Feb 2002 18:43:25 Rick Harding posted:
I have a drop down menu that pulls together the first and last name fields in a database. The code is:

<pre id=code><font face=courier size=2 id=code>
&lt;option value="&lt;%=(rsJudgeList.Fields.Item("First_Name".Value)%&gt;-&lt;%=(rsJudgeList.Fields.Item("Last_Name".Value)%&gt;" &lt;%if (CStr(rsJudgeList.Fields.Item("First_Name".Value & "-" & rsJudgeList.Fields.Item("Last_Name".Value) = CStr(rsUpdateSched.Fields.Item("tfld_judge_1".Value)) then Response.Write("SELECTED" : Response.Write(""%&gt;&gt;&lt;%=(rsJudgeList.Fields.Item("First_Name".Value)%&gt;   &lt;%=(rsJudgeList.Fields.Item("Last_Name".Value)%&gt; &lt;/option&gt;
</font id=code></pre id=code>

Right now I use a dash to seperate the first and last names. I could not get a blank space to work when I checked the value again. If I did & " " & i"d get the first & and then it would end without getting to the last name. How do can I handle this to put together the first and last name fields?

I'd like
First_Name Bob
Last_Name Fred

Print out and input as 'Bob Fred'

Thanks a lot for any help. It's been driving me mad today.



Rick Harding
U of M CS Student / Network Admin for MSU FAME
"Techies just think differently...at least that's what they keep telling me"

Edited by - deuce868 on 21 Feb 2002 18:44:14

Replies

Replied 22 Feb 2002 10:02:52
22 Feb 2002 10:02:52 Viktor Farcic replied:
Insert &gt; Special Characters &gt; Non-Breaking Space

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I have a drop down menu that pulls together the first and last name fields in a database. The code is:

<pre id=code><font face=courier size=2 id=code>
&lt;option value="&lt;%=(rsJudgeList.Fields.Item("First_Name".Value)%&gt;-&lt;%=(rsJudgeList.Fields.Item("Last_Name".Value)%&gt;" &lt;%if (CStr(rsJudgeList.Fields.Item("First_Name".Value & "-" & rsJudgeList.Fields.Item("Last_Name".Value) = CStr(rsUpdateSched.Fields.Item("tfld_judge_1".Value)) then Response.Write("SELECTED" : Response.Write(""%&gt;&gt;&lt;%=(rsJudgeList.Fields.Item("First_Name".Value)%&gt;   &lt;%=(rsJudgeList.Fields.Item("Last_Name".Value)%&gt; &lt;/option&gt;
</font id=code></pre id=code>

Right now I use a dash to seperate the first and last names. I could not get a blank space to work when I checked the value again. If I did & " " & i"d get the first & and then it would end without getting to the last name. How do can I handle this to put together the first and last name fields?

I'd like
First_Name Bob
Last_Name Fred

Print out and input as 'Bob Fred'

Thanks a lot for any help. It's been driving me mad today.



Rick Harding
U of M CS Student / Network Admin for MSU FAME
"Techies just think differently...at least that's what they keep telling me"

Edited by - deuce868 on 21 Feb 2002 18:44:14
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager

Reply to this topic