[thelist] ASP & HTML: Pass double data from a Select
Anthony Baratta
Anthony at Baratta.com
Tue Jul 15 13:25:59 CDT 2003
At 11:06 AM 7/15/2003, Casey Crookston wrote:
>In an ASP app, I've got an HTML select object within a form:
>
><select name='fruit'>
> <option value='1'>apples</option>
> <option value='2'>peaches</option>
></select>
Here's what I do:
I write a small function to get the name of the Option via the ID.
e.g. (psuedo code)
function GetFruitNameByID (varID)
select Name from FruitBasket where ID = varID
GetFruitNameByID = objRS("Name")
end function
Then just use the Function on your preview page to return the name selected.
<%=GetFruitNameByID(Request.Form("fruit"))%>
--
Anthony Baratta
President
Keyboard Jockeys
"Conformity is the refuge of the unimaginative."
More information about the thelist
mailing list