This topic is locked

DB value vs Display value

7/26/2004 9:45:16 PM
ASPRunnerPro General questions
R
raymonger author

Hello,
Is there a way to have the radio buttons display values different than the database insert values? For example, I have two radio button choices for the user, let's say "House" and "Condo," but the field for that is a char(1) and the inserted value should be "H" or "C." I know this is possible in HTML by just supplying a value for each radio button option, but I can't figure it out in ASPRunner.
Thanks,

Ray

swat 7/27/2004

hi Ray-
As far as I know ASPRunner does not support what you are asking..but on the other hand I would do something like this:



1- set up your ASPRunner and get the datafield field in values as "house"."condo"

2- set up at the very end of your page another sql connection ,

<%

connect....

open data base
update where value='house' set value='h'

update where..........'condo'................'c'
close data base
%>
R
raymonger author 7/27/2004

Hello swat,
Thanks for the idea. Just trying to think of another option, as I'm trying to avoid needing to update the field afterward, I was looking at the pages ASPRunner generates and one of them [page]_aspfunctions looks like it stores the radio button options in an array. I'm assuming ASPRunner then generates the HTML from these values. I wonder if there might be a way to use key pairs since it looks like ASPRunner always supplies the value variable for each radio button even though the value is the same as the display value.
Just thinking aloud...
Thanks again for your help.

Ray

Sergey Kornilov admin 8/3/2004

Ray,
also you can try latest ASPRunnerPro update where you can pick two different database fields for this purpose (Link Field and Display Field).
http://www.asprunner.com/files/asprunnerpro31a.exe