Selecting a value for a combobox

Posted on 2012-08-28
Medium Priority
Last Modified: 2012-08-28

I am trying to select the vaue of a combobox based on what's in the database, but it does not select it:

<select name="MemberType" id="MemberType" value = "
      if ElAp = "AP" then response.write("Appointed")
      if ElAp = "EL" then response.write("Elected")

Any ideas?
Question by:prosit
LVL 54

Accepted Solution

Scott Fell,  EE MVE earned 2000 total points
ID: 38343059
It's going to look more like this

<option <%if ElAp="AP" then response.write "selected" end if >Appointed</option>
<option <%if ElAp="EL" then response.write "selected" end if >Elected</option>
<option <%if ElAp="CO" then response.write "selected" end if >Coach</option>

Author Closing Comment

ID: 38343077
Here's the correct syntax, but thanks, got me all fixed!!!

<select name="MemberType" id="MemberType">
<option <%if ElAp="AP" then response.write("selected") end if %>>Appointed</option>
<option <%if ElAp="EL" then response.write("selected") end if %>>Elected</option>
<option <%if ElAp="CO" then response.write("selected") end if %>>Coach</option>

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question