Hi Travis,
when checkbox is checked, it will return 'on' else it will return
'nothing'. Tirm is throwing Null reference error when checkbox is not
checked.
So Please try deleting Tirm in your code.
deleteme = Request.form("delete" & count.toString)
Regards
Divakar
> ----------
> From: dotnet digest[SMTP:[EMAIL PROTECTED]]
> Reply To: dotnet
> Sent: Sunday, January 05, 2003 1:30 PM
> To: dotnet digest recipients
> Subject: dotnet digest: January 04, 2003
>
> DOTNET Digest for Saturday, January 04, 2003.
>
> 1. I want to delete any permutation of a list
>
> ----------------------------------------------------------------------
>
> Subject: I want to delete any permutation of a list
> From: "Travis D. Falls" <[EMAIL PROTECTED]>
> Date: Sat, 4 Jan 2003 19:09:31 -0500
> X-Message-Number: 1
>
> I have a list that I am writing out. I this list is a form with the
> entries from a guestbook. I have a checkbox next each of the entries.
> The name of the checkboxes are "delete0", delete1", ect. They are built
> dynamically. I have a hidden field at the end that has numDelete = n
> what ever the total number of guestbook entries are. I want to call a
> submit function where I loop numDelete number of times, checking to see
> if I can get the delete0 or delete1, ect (if it is checked off) if it is
> I delete that entry. It isn't working and isn't throwing errors. Here
> is the function, can someone give me pointers?
>
> Sub submit(sender As Object, e As System.Web.UI.ImageClickEventArgs)
>
> Dim numDelete as int32
> numDelete =
> Integer.parse(Request.Form("numDelete").trim)
>
> Dim count as int32
> count = 0
> Dim deleteme as String
> Dim sqlString as String
>
> Dim objConnection As New
> System.Data.SqlClient.SqlConnection(connection info goes here)
>
> do while count > numDelete
> try
> deleteme = Request.form("delete" &
> count.toString).trim
> sqlString = "DELETE tblMessageBoard
> WHERE messageID =" & "'" & deleteme & "'"
> errors.text += sqlString & " "
>
> dim objCommand = new
> SqlCommand(sqlString, objConnection)
> objCommand.Connection.Open()
> objCommand.CommandType =
> CommandType.Text
> objCommand.ExecuteNonQuery()
> objCommand.Connection.Close()
>
> catch ee as Exception
> errors.text += ee.tostring + " " + count
> end try
>
> count = count + 1
> loop
>
> Dim url as String
> url =
> "http://www.unsygnedartist.com/loggedIn/bboardview.aspx"
> Response.Redirect(url)
> End Sub
>
>
>
>
> ---
>
> END OF DIGEST
>
> ---
> You are currently subscribed to dotnet as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
> %%email.unsub%%
>
> ---------
> Administrated by 15 Seconds : http://www.15Seconds.com
> List Archives/Search : http://local.15Seconds.com/search
> Subscription Information : http://www.15seconds.com/listserv.htm
> Advertising Information: http://www.internet.com/mediakit/
>
**************************************************************************
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************
---
You are currently subscribed to dotnet as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/