I have an ASP.NET TextBox and I want it to be ReadOnly. (The user modify it using another control)
TextBox
ReadOnly
But when there is a PostBack()
PostBack()
Another solution I found and easier one:
Add this to the Page Load method:
protected void Page_Load(object sender, EventArgs e) { TextBox1.Attributes.Add("readonly", "readonly"); }