Assume it Connects to the DB and here is part if the Body:
VB Code:
While Not rs.EOF ' rs is the recordset Response.Write("<tr>") Response.Write("<td align='left'><i>" & rs.Fields(0).Value & "</i></td>") Response.Write("<td align='left'>" & rs.Fields(1).Value & "</td>") Response.Write("</tr>") CountryValueList &= "<option value = " & rs.Fields(1).Value & ">" & rs.Fields(0).Value & "</option>" rs.MoveNext End While response.write("</table>") Response.Write("<br><h4 align = 'center'><SELECT name='CarValue' id='ZarValue'>" & CountryValueList & "</SELECT>") DatabaseConnection.close 'If (Request.Form("btnCalculateRate") = "Calculate Rate") Then 'button was pressed 'Else 'Session.Abandon 'End If Response.Write("<br><h4 align = 'center'>" & CarValue.selectedindex.value & ") Response.Write("<br><input type='submit' name='btnCalculateRate' value='Calculate Rate'/>
CarValue is the name assigned to the Combobox.
CountryValueList is the name of the countries and the value for each Country is an ID for Example:
South Africa is the Item displayed, its hidden value is 0.88 for example
The problem is the line:
Response.Write("<br><h4 align = 'center'>" & CarValue.selectedindex.value & ") gives the error saying CarValue is undeclared. I also would Like the Code where if I click Sumit it would take the Current Selected Country in the ComboBox, then Display it in a Label. That is what I Am trying to do in the If Statements:
VB Code:
'If (Request.Form("btnCalculateRate") = "Calculate Rate") Then 'button was pressed 'Else 'Session.Abandon 'End If
Thanks




Reply With Quote