Similar to Hotmail Functionality

Results 1 to 3 of 3

Thread: Similar to Hotmail Functionality

  1. #1
    Paul Cawley Guest

    Default Similar to Hotmail Functionality

    I have a list of records displaying on my asp page that are created by looping through a SQL database. For each record I have a checkbox and, at the bottom of the page a submit button. What I want to do is similar to the delete mail functionality in Hotmail, in that I would like to check one or many records, press the submit button and have them be deleted from the database. <BR><BR>Can anyone help?<BR><BR>Thanks<BR><BR>The main trouble I&#039;m having with this is trying to uniquly identify the checkbox / records as they are dynamically created.<BR>

  2. #2
    sajeev Guest

    Default RE: Similar to Hotmail Functionality

    helo Paul Cawley ,<BR><BR>you have to collect all the datas to an array and itrate the array with coma using loop. All the contents in the array will be separated with coms<BR><BR>regards<BR>sajeev

  3. #3
    hamisuha Guest

    Default Take it as an example

    &#039;say name of your checkbox is check and you have assigned ID <BR>&#039;numbers of the records as the value of these checkboxes.<BR>&#039;&#060;input type="checkbox" name="check" value="&#060;%=rstemp("ID")%&#062;"&#062;<BR>&#039 ;on the first page and the code below deletes iterating through<BR>&#039; the records on your database<BR><BR>CheckNum = Request.Form("check").Count<BR> &#039; LOOP THROUGH CHECKED ITEMS AND DELETE THEM<BR> tmpCount = 0<BR> For i = 1 to CheckNum<BR> SQLQuery = "DELETE * FROM your_table where ID = " & Request.Form("check")(i)<BR> set rs1 = dbcon.execute(SQLQuery) <BR> tmpCount = tmpCount + 1<BR> Next<BR>

Posting Permissions

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