Forums

ASP

This topic is locked

Dynamic List/Menu

Posted 28 Feb 2003 08:35:45
1
has voted
28 Feb 2003 08:35:45 Jeff Jacobson posted:
Hi,

This maybe another one of those simple question/answers.

In a dynamic List/Menu, How do I display more then one dynamic column?

The example is I want to see a users Extension then last name then First name.

It’s all in the table. Do I need to manually edit the script?

Thanks in advance..

Replies

Replied 18 Mar 2003 03:17:28
18 Mar 2003 03:17:28 Dave Blohm replied:
are all the bits of information in different fields?

Doc
Rangewalk Digital Studios
Replied 18 Mar 2003 04:30:57
18 Mar 2003 04:30:57 Jeff Jacobson replied:
Yes, the 'Ext', 'Last Name', 'First name' are each a different in the database. Again I want to be able to display all three in the List/Menu and pass the 'Ext' field to the query for the results page.

Replied 18 Mar 2003 20:21:50
18 Mar 2003 20:21:50 johan tessens replied:
Yes you can

<pre id=code><font face=courier size=2 id=code> &lt;select&gt;
&lt;%
While (NOT Recordset1.EOF)
%&gt;
&lt;option value="&lt;%=(Recordset1.Fields.Item("ID".Value)%&gt;"&gt;&lt;%=(Recordset1.Fields.Item("name".Value)& " " & (Recordset1.Fields.Item("ext".Value)%&gt;&lt;/option&gt;
&lt;%
Recordset1.MoveNext()
Wend
If (Recordset1.CursorType &gt; 0) Then
Recordset1.MoveFirst
Else
Recordset1.Requery
End If
%&gt;
&lt;/select&gt;</font id=code></pre id=code>

You have to alter the code by hand

Reply to this topic