Place Selected Data From Listbox Into Global Variable

Question:

I need to put a selected item from a drop-down listbox into a global variable. The listbox is named select1. Here is my code:

<%dim strDatastrData = Request.Form ("select1")Application("Currentfile") = strData %> 

When I go the next page, the Currentfile variable is Empty.

Answer:

Are you sure there is data in the strData variable? Check for that first, by adding response.write strData in your code. Next, check to see if your form is using a METHOD = GET or POST and change your Request… line accordingly to obtain the data from the QueryString or from the Form.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: