asp.net mvc - How will model binder deals with Readonly & disabled -


i have following 2 items , 1 readonly:-

@html.textboxfor(model => model.technology.tag, new          { @readonly = "readonly" }) 

while other disabled:-

@html.dropdownlistfor(model => model.customer.name, ((ienumerable<tms.models.accountdefinition>)viewbag.customers).select(option => new selectlistitem {     text = (option == null ? "none" : option.org_name),     value = option.org_name.tostring(),     selected = (model != null) && (model.customer != null) & (option.org_name == model.customer.name) }), "choose...", new { disabled = "disabled" }) 

so asp.net mvc model binder bind 2 items? , or ignore read-only , disabled fields ?

readonly , disabled effects client-side only, meaning behavior on server not change based on parameters.

if tried before posting question, have noticed posted data doesn't model, because form data not include disabled , readonly fields (or @ least, on common browsers).

in other words : yes, model binder fine binding fields, never receive data if field disabled or readonly.


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 -