|
-
Apr 5th, 2003, 08:20 PM
#1
Thread Starter
New Member
Listbox Update
Basically I have a page which reads all the details from another so that an update can take place. I want the listbox to have the value which was already chosen, but still provide the options of the list box so that the student can change the details in question (book Category) below is the code I have written
<b>Book Category:</b>
</td>
<td>
<!--<input name="book_Category"
size="50" maxlength="50"!-->
<select name="Books">
<%
dim objRS
set objRS = Server.CreateObject("ADODB.Recordset")
objRS.open "Category", objCon,,,amdCmdTable
value="<%=Server.HTMLEncode( book_Category )%>">
Do while not objRS.eof
response.Write "<OPTION VALUE='" & objRS("CatCode") &"'>"
response.write objRS("Description")
objRS.movenext
loop
objRS.Close
set objRS = Nothing
objCon.Close
set objCon = Nothing
%>
</select>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|