devxlogo

Pass Both the Value and Text of a SELECT Control

Pass Both the Value and Text of a SELECT Control

Question:

How do I pass both the option value and option label parameter through ASP?

Answer:

Create a hidden input (text) box within the form:

Then, write code for the ONCHANGE event of the SELECT control to populate the hidden text box: