asp.net - .NET Control.ID property inconsistency -



asp.net - .NET Control.ID property inconsistency -

please have @ code below:

partial class _default inherits system.web.ui.page protected sub page_load(byval sender object, byval e system.eventargs) handles me.load dim c1 new checkbox c1.id = "test1/" 'line 7 placeholder1.controls.add(c1) end sub protected sub button1_click(byval sender object, byval e system.eventargs) handles button1.click each c command in page.controls each d command in c.controls each f command in d.controls each g command in f.controls each h command in g.controls if typeof h checkbox dim cbox new checkbox cbox = ctype(h, checkbox) msgbox(cbox.checked) 'line 20 end if next next next next next end sub end class

there placeholder on default.aspx page called: placeholder1. messagebox on line 20 printing true. please have @ quote below taken next webpage: http://msdn.microsoft.com/en-us/library/system.web.ui.control.id.aspx

"only combinations of alphanumeric characters , underscore character ( _ ) valid values property. including spaces or other invalid characters cause asp.net page parser error."

/ not alphanumeric character, how can message box print true? if alter line 7 to: c1.id = "test1:", prints false expect (because : (colon) none alphanumeric). there isn't consistency. missing something.

asp.net vb.net

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

Hibernate criteria by a list of natural ids -

ios - Lagging ScrollView with UIWebview inside -