
Oct 11th, 2004, 02:08
|
|
Most Reputable Member
|
|
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Thanks: 0
Thanked 4 Times in 3 Posts
|
|
|
Delete All Row (Select All Row Using Radio Button)
Ok guys...
Let say I have an ASP page that will displays all my data in the database.
Each row, I provide a DELETE button so the specific row can be deleted!
This method can be very hard if we are consider to delete all the data with ONE CLICK!
Can anybody guide me on how to use a RADIO BUTTON to select all the row and at the end of the page, there is a DELETE button that will delete whatever row that I have selected to be deleted ??:
This is the display database page...
- Code: Select all
<%
While ((Repeat1__numRows <> 0) AND (NOT admin.EOF))
%>
<tr bgcolor="#E6E6E6">
<td width="182" bordercolor="#0D5692" height="1" align="center" bordercolorlight="#000000" bordercolordark="#000000" bgcolor="#FFFFFF">
<div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=(admin.Fields.Item("name").Value)%></font></div>
</td>
<td width="120" bordercolor="#0D5692" height="1" align="center" bordercolorlight="#000000" bordercolordark="#000000" bgcolor="#FFFFFF">
<div align="center" style="width: 6; height: 0"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=(admin.Fields.Item("ID").Value)%></font></div>
</td>
<td width="181" bordercolor="#0D5692" height="1" align="center" bordercolorlight="#000000" bordercolordark="#000000" bgcolor="#FFFFFF">
<div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=(admin.Fields.Item("email").Value)%></font></div>
</td>
<td width="115" bordercolor="#0D5692" height="1" align="center" bordercolorlight="#000000" bordercolordark="#000000" bgcolor="#FFFFFF">
<div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=(admin.Fields.Item("username").Value)%></font></div>
</td>
<td width="116" bordercolor="#0D5692" height="1" align="center" bordercolorlight="#000000" bordercolordark="#000000" bgcolor="#FFFFFF"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=(admin.Fields.Item("password").Value)%></font></td>
<td width="51" bordercolor="#0D5692" height="1" align="center" bordercolorlight="#000000" bordercolordark="#000000" bgcolor="#FFFFFF">
<div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
">Delete
</font></div>
</td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
admin.MoveNext()
Wend
%>
|