How to make asp code with option buttons if statements

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Raman Pahwa
    New Member
    • Jul 2008
    • 43

    How to make asp code with option buttons if statements

    I want to make an ASP code with option buttons. If i select an options the code related to that gets activated.Plz help.
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    Hi there,

    How much experience of ASP do you have? What have you written so far?

    Dr B

    Comment

    • Raman Pahwa
      New Member
      • Jul 2008
      • 43

      #3
      Originally posted by Raman Pahwa
      I want to make an ASP code with option buttons. If i select an options the code related to that gets activated.Plz help.
      2 yrs of exp........

      Comment

      • idsanjeev
        New Member
        • Oct 2007
        • 241

        #4
        Originally posted by Raman Pahwa
        2 yrs of exp........
        Thats good
        whats code you are using
        this code is working for data based on option button
        Code:
        <body>
        <form action="test5.asp" method="post">
        <table>
        <tr>
        <td>
        <select name="opt" >
        <option value="option1">option1</option>
        <option value="option2">option2</option>
        <option value="option3">option3</option>
        <option value="option4">option4</option>
        </select>
        </td></tr></table>
        <%'session("option")=%>
        <input type="submit">
        
        <%
        'this code is normally print your  select option
        Response.Write(Request.Form("opt"))
        'If you wants to select from database based on your option
        'open conn  with database and select with this query
        set R1=conn.execute("select *from your tablename where yourfield='"&Request.Form("opt")&"'")
        Response.Write(R1("yourfields"))
        
        %></form>
        </body>
        provide more detail with code if porblems
        Dr. B is already asked you whats code you are using for it
        regards
        jha

        Comment

        Working...