asp.net - JQuery check box doesn't keep checked=''checked' -


i updating check box programmatically

$("span[data-id=test] input[type='checkbox']").prop('checked', 'checked'); 

visually works perfect.

but

  1. when looking in page source does't set checked=''checked', if manually does.
  2. it dissapere after postback,
  3. i can't use in in asp.net in postback events,

i trying different ways:

.prop('checked', true); .attr('checked', 'checked'); 

the same issues..

'checked=checked' not ( , not suppose to) on view source. (when modifying dom via js)

you changed dom tree attributes. didn't change html markup !

these kind of changes visible firebug or better , chrome developer toolbar

for "disappear after postback" , not. can't be. input value transferred server. must have else there.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -