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()
txtStartDate.Attributes.Add("readonly", "readonly"); on pageload in the best of the best solutions ,instead or Javascripts,hidden variables,cache,cookies,sessions & Caches.
txtStartDate.Attributes.Add("readonly", "readonly");