asp.net - Find checkbox that tharts with id -


i'm trying loop trough bunch of checkboxes start specific id.

this bit of code seems normal, doesn't find :

    dim childc control     dim c control     each c in me.page.controls         each childc in c.controls             if typeof childc checkbox                 if ctype(childc, checkbox).checked                     if childc.id.startswith("ctl00_indexbody_id_activite_")                         = + 1                         alerte(ctype(childc, checkbox).text)                         strsql = "insert a_activites values("                         strsql += me.id_prestataire.text + "," + childc.id + ","                         strsql += ")"                         owebconnection.execute(strsql)                     end if                 end if             end if         next     next 

it breacks in second line saying

it's impossible cast objet of type 'asp.masterpage_master' 'system.web.ui.webcontrols.checkbox 

thank's help

declare c , childc control, not checkbox.

the declaration of c not visible think made same mistake.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -