If you double click on the edit button in the design window, it will create a method like this:
protected void btnEdit_Click(object sender, EventArgs e)
{
}
Just add the following code:
txtbox.ReadOnly = true;
To make your textbox read-only.
GregD
source
to share