-
I only have one problem... I want to have a page with 1 drop down list and a submit button... I am writing an IIS app and need to know how to tell which selection the user has selected. Any examples would be helpfull. Like, a drop down list with 2 entries and the code that captures the selection posting a simple message stating which was selected.
Thanks to all for any help. Do I need to use javascript or can I do it within the VB IIS app?
AmigaZoid
-
It sounds like you haven't done much ASP programming at all.. this is a fairly fundamental principle... I would suggest having a read of an ASP book.
But here is the rough idea :
The HTML page :
Code:
<FORM METHOD=POST ACTION="dest.asp">
<INPUT TYPE=TEXT NAME=FamilyName SIZE=20 MAXLENGTH=20>
<BR>
<SELECT NAME=Age SIZE=1>
<OPTION VALUE=" 0-20"> 0-10</OPTION>
<OPTION VALUE="21-40">21-40</OPTION>
<OPTION VALUE="41+">41+</OPTION>
</SELECT>
<BR>
<INPUT TYPE=SUBMIT VALUE="Send Button">
</FORM>
Now in your ASP page you can use the following :
Code:
<%
Response.Write Request.Form("FamilyName") & vbCR
Response.Write Request.Form("Age") & vbCR
%>
You see all variables in a form are placed in the collection Request.Form and their results can be accessed simply by using the "NAME" attribute of the INPUT/SELECT tag