vb.net - How to check if Masked textbox is empty? -


i have several textboxes , masked texboxes in winform need check if empty, null or nothing before proceeding.

the code have part working intended, if there empty texbox message telling user textbox empty , exits sub, reason not checking masked textboxes.

maybe i'm wrong , checking them, since have mask they're not considered empty or null.

your checking if masked texboxes empty appreciated.

this code:

private sub btncargarinformacion_click(sender system.object, e system.eventargs) handles btncargar.click     each mycontrol control in me.groupbox1.controls         if typeof (mycontrol) textbox             if mycontrol.text.equals(string.empty)                 messagebox.show(string.format("please fill following textboxes: {0}", string.join(",", mycontrol.name)))             end if             if mycontrol.text.equals(string.empty)                 exit sub             end if         end if     next     dim partepersonaltableapt new personalobradatasettableadapters.partepersonaltableadapter     dim personalobtableapt new personalobradatasettableadapters.personalobtableadapter     partepersonaltableapt.clearbeforefill = true     partepersonaltableapt.fillbyfecha(personalobradataset.partepersonal, txtdate.text, txtdepartamento.text, txtturno.text)     personalobtableapt.clearbeforefill = true     personalobtableapt.fillby(personalobradataset.personalob) end sub 

if textbox.maskcompleted=true     'they entered  else      ' didnt enter  endif 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -