problems checkbox in datagrids

S

Samuel Chowdhuri

this peace of code is giving me trouble

DIM i as DataGridItem

for each i in myDataGrid
checkbox chkbox = Ctype(i.findcontrol("deletethis"),checkbox)

if(chkbox.checked) then
......
.....

Compiler Error: Value of type 'System.Web.UI.Control' cannot be converted to
'System.Windows.Forms.CheckBox'.

How can I overcome this, i need to be able to see if the checkbox is checked
or not.


Thanx
 
J

Juan Wajnerman

The error message says that you are trying to cast the control to a
WinForm's CheckBox, instead of an ASP.NET's one!!
Did you included the System.Windows.Forms.dll assembly to your ASP.NET
project??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top