Asp Codes
ActiveX
ADO
Array
Code Snippets
Components
Data Access
Date Time
Files
Graphics
HTML Formatting
Mathematics
Miscellaneous
Sessions
SQL
Strings
Techniques
XML
Asp > Data Access sample source codes
Dynamic Dropdown Boxes
Dynamic Dropdown Boxes <select size="1" name="LocationCode"> <option selected><%=LocationCode%></option> <% On Error Resume Next SET GENERAL = Server.CreateObject("ADODB.Recordset") GENERAL.ActiveConnection = "DSN=ODBC NAME" or connection string of choice GENERAL.Source = "Select DESCRIPTION From DESCRIPTION Order By DESCRIPTION" GENERAL.CursorType = 0 GENERAL.LockType = 3 GENERAL.Open GENERAL_numRows = 0 Do until GENERAL.EOF = True response.write "<option>" & trim(GENERAL.Fields.Item("DESCRIPTION").value) & "</option>" GENERAL.Movenext Loop GENERAL.Close Set General = Nothing response.write "<option>OTHER</option>" %> </select>
Privacy Policy
|
Link to Us
|
Links