![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
| I am trying to convert a list of different database values (numbers) to a value | (text) specified by a page. | | I have 2 tables, the master table holds the category Id and Name, the related | secondary table holds just the Id. | I need the page to convert the values from a set list. | | For example, if the recordset returns the value 2, the page would display the | text "Category Value 02" | I need to create this effect with 8 different possible values from the | database. | | I have partially created this effect by editing one of RobGT.com extensions, | but found it a messy solution that had additional unwanted effects. | The code i have created is as follows... | | <% | If (Recordset1.Fields.Item("ID").Value) <> "1" Then% | <%=Replace(Recordset1.Fields.Item("ID").Value,chr( 13),"<br>")% | <% Else | Response.Write ("Category Value 01") | End If % | <% | If (Recordset1.Fields.Item("ID").Value) <> "2" Then% | <%=Replace(Recordset1.Fields.Item("ID").Value,chr( 13),"<br>")% | <% Else | Response.Write ("Category Value 02") | End If % | <% | If (Recordset1.Fields.Item("ID").Value) <> "3" Then% | <%=Replace(Recordset1.Fields.Item("ID").Value,chr( 13),"<br>")% | <% Else | Response.Write ("Category Value 03") | End If % | | Anyone any ideas on solving this problem? | Im using ASP VB | TIA | Rob |
![]() |
| Thread Tools | |
| Display Modes | |
| |