Results 1 to 2 of 2

Thread: IIS app and drop down list...Please help...

  1. #1
    Guest

    Post

    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

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    461

    Post

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width