set textbox readonly using css





Something to be aware of is that if you set that readonly value to false, you actually wont see any change in behavior! So if you need to drive this based on a variable, you cannot simply plug that variable in there. Instead you need to use conditional logic to simply not pass that readonly attribute in. I realized that I need to set all textboxes to readonly. It would take time to change controls to labels as there are really many. What CSS should i add?You really need to use javascript for this. Something like: