You should handle errors in any case. Why do you need to know which selections were NOT chosen?
HTH, Tore. -----Original Message----- From: Falls, Travis D (CASD, IT) [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 9:30 AM To: ActiveServerPages Subject: RE: getting check box values dynamically So if only checked items are available on the server side how do I figure out which ones are checked and which ones aren't? I am getting issues when I try to put data in an array list when there isn't data. (checked values). Regards, Travis D. Falls SR. Software Engineer The Hartford (CASD) 860.547.4070 [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> http://www.thehartford.com -----Original Message----- From: Roji Thomas [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 1:32 AM To: ActiveServerPages Subject: Re: getting check box values dynamically But only the CHECKED items are available on the server side, IIRC HATH Roji ----- Original Message ----- From: "Falls, Travis D (CASD, IT)" <[EMAIL PROTECTED]> To: "ActiveServerPages" <[EMAIL PROTECTED]> Sent: Friday, October 11, 2002 8:16 AM Subject: getting check box values dynamically > I am getting this error, when I try to cast it. > > here is the line of code, all I want to do is loop through a bunch of html > checkboxes, and out of the total (delete & i) set of possible check boxes > retrieve the ones that are checked. How can I do this, I can't figure it > out. > > > for t = 0 to r > 'if(request.Form("delete" & t).checked <> true) then > If (ctype(request.form("delete" & > t),system.web.ui.webcontrols.checkbox).checked <> true) > try > memberid.Add(request.Form("delete" & t)) > catch ee as Exception > end try > end if > t = t + 1 > next > > > > Compiler Error Message: BC30311: Value of type 'String' cannot be converted > to 'System.Web.UI.WebControls.CheckBox'. > > Source Error: > > > > Line 130:for t = 0 to r > Line 131:'if(request.Form("delete" & t).checked <> true) then > Line 132:If (ctype(request.form("delete" & > t),system.web.ui.webcontrols.checkbox).checked <> true) > Line 133: try > Line 134: memberid.Add(request.Form("delete" & t)) > > > > Regards, > > Travis D. Falls > > > This communication, including attachments, is for the exclusive use of > addressee and may contain proprietary, confidential or privileged > information. If you are not the intended recipient, any use, copying, > disclosure, dissemination or distribution is strictly prohibited. If > you are not the intended recipient, please notify the sender > immediately by return email and delete this communication and destroy all copies. > > > --- > You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] > To unsubscribe send a blank email to %%email.unsub%% > --- You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% --- You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
