how to set readonly property of textbox using c#





When we use Enabled Property to false, Textboxs text is grayed out and we cannot focus on the control and when we use ReadOnly property to true then you will see that the textboxs content is not grayed out but the content is non editable. Ok still if you want to set the ReadOnly property to true in design mode then follow the below HTML Markup: