Getting info from Drop Down




I'm trying to use a drop down list for the user to select an entery which
will goo back to the database and grabs what the user selects then outputs a
list using ConnectDatabase.asp. The problem is I don't know how to make input
tags for a drop down? Hi I have a html file with the following:

<form name "input" action "ConnectDatabase.asp" method "get">

<select>BedroomSize
<optgroup label="Bedroom Size">
<option value = "Bachelor"> Bachelor </option>
<option value = "Room / Share"> Room / Share
</option>
<option value = "1"> 1</option>
<option value = "2"> 2 </option>
<option value = "3">3 </option>
<option value = "4"> 4 </option>
<option value = "5+"> 5+ </option>

</optgroup>
</select>
<input type="submit" value="Submit">
</form>

And I have an .asp file with the following
<%
Option Explicit
Response.Expires = -1000

Dim oConn
Dim oRS
Dim sSQL
Dim sColor


Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
Server.MapPath("\EmilyLeeParsons\db\HHCDataBase.mdb"))

sSQL = "SELECT DatePosted, Area, NearestIntersection, HousingType,
BedroomSize, Rent, Details FROM TblHousing"
Set oRS = oConn.Execute(sSQL)

Response.Write("<table border=1 cellpadding=1 cellspacing=1
style='font-family:arial; font-size:10pt;'>")
Response.Write("<tr bgcolor=black style='color:white;'><td>DatePosted</td>")
Response.Write("<td>Area</td>")
Response.Write("<td align=right>NearestIntersection</td>")
Response.Write("<td>HousingType</td>")
Response.Write("<td align=right>BedroomSize</td>")
Response.Write("<td align=right>Rent</td>")
Response.Write("<td>Details</td></tr>")

sColor = "white"

Do While NOT oRS.EOF

If sColor = "silver" Then
sColor = "white"
Else
sColor = "silver"
End If

Response.Write("<tr bgcolor='" & sColor & "'>")
Response.Write("<td>" & oRS("DatePosted").Value & "</td>")
Response.Write("<td>" & oRS("Area").Value & "</td>")
Response.Write("<td>" & oRS("NearestIntersection").Value & "</td>")
Response.Write("<td>" & oRS("HousingType").Value & "</td>")
Response.Write("<td>" & oRS("BedroomSize").Value & "</td>")
Response.Write("<td align=right>$" & oRS("Rent").Value & "</td>")
Response.Write("<td align=right>" & oRS("Details").Value & "</td></tr>")

oRS.MoveNext

Loop

Response.Write("</table><br><br>")

oConn.Close
Set oRS = Nothing
Set oConn = Nothing

%>


How do I get the information from the html page drop down to the asp page?
.



Relevant Pages

  • Re: Access Data in Excel Cell
    ... Public Function CompName(DSN As String) As String ... Dim oConn As Object ... Set oConn = CreateObject ... Set oRS = CreateObject ...
    (microsoft.public.excel)
  • Re: Access Data in Excel Cell
    ... Public Function CompName(DSN As String) As String ... Dim oConn As Object ... Set oConn = CreateObject ... Set oRS = CreateObject ...
    (microsoft.public.excel)
  • FYI: How to populate a document using ADO/ODBC without the use of mailmerge.
    ... Dim splitCode As Variant, code As String, cnt As Integer ... Set oConn = New ADODB.Connection ... Set oRs = New ADODB.Recordset ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Parsing CSV file
    ... You can reference the Fields ordinally: ... Dim oConn As ADODB.Connection ... Set oConn = New ADODB.Connection ... Set oRS = New ADODB.Recordset ...
    (microsoft.public.vb.general.discussion)
  • Re: Update syntax
    ... Private Sub cmdOK_Click ... Dim iNewOnHand as Integer ... Set oRs = New ADODB.Recordset ... Set oConn = CurrentProject.Connection ...
    (comp.databases.ms-access)

Loading