ASP Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sakhan
    New Member
    • Sep 2006
    • 10

    ASP Help

    I need help with the using check boxes in asp.

    eg I have a list of records say 5 records, I want to select three records from them and delete them.

    ID Name Address
    checkbox 1 John London
    checkbox 2 James New York
    checkbox 3 Steve Sydney
    checkbox 4 Smith Paris
    checkbox 5 Toni Rome


    Help in this regard is highly aprreciated.
  • dswethar
    New Member
    • Nov 2006
    • 65

    #2
    You can have the same name for all your checkboxes. Eg. chkDelete. Give the id of the record as the value of the check box.

    In ASP Delete Function / Sub, after opening the connections, record set, etc.

    <%
    dim i
    for i = 1 to Request.Form("c hkDelete").Coun t

    Delete From <table>
    Where id = Request.Form("c hkDelete")(i)

    next
    %>

    This should work.

    Comment

    Working...