![]() |
| |||||||
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
| ||||
| Code: sub comboMaker(varSQL, varID, varField, varSelected)
' This sub creates a generic combo box with values from a table
set rsDD = GetRS(varSQL)
set obj = nothing
do while not rsDD.eof
response.Write("<option value=""" & rsDD(varID) & """")
if varSelected <> "" then
if cstr(rsDD(varID)) = cstr(varSelected) then
response.Write(" selected ")
end if
end if
response.Write(">" & rsDD(varField) & "</option>" & vbCrLf)
rsDD.MoveNext
loop
end sub
Code: strSQL = "SELECT intID, strField FROM tbl_TableName ORDER BY strField"
response.Write("<select name=""testDropDown"">" & vbCrLf
response.Write(vbTab & "<option value="""">Select ....</option>" & vbCrLf
Call comboMaker(strSQL, intID, strField, request("testDropDown"))
respone.Write("</select>")
__________________ Quote of the Month: Strife: As long as we have each other, we'll never run out of problems. Questions to Ponder: Should vegetarians eat animal crackers? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright © 2008 sbenj69 |
| Sponsored Links |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
| Sponsored Links |
| ASP.NET Resource Index a directory of ASP.NET tutorials, applications, scripts, assemblies and articles for the novice to professional developer. Free Web Directory Including Chats and Forums Resources, Offer automatic, instant and free directory submissions. | URLZ Web Directory URLZ Web Directory Free Web Directory - Add Your Link The Little Web Directory | Free Web Directory Pegasus free web directory is a free directory organised by categories. Web Directory & SEO Services dirroot web directory |