ASP.net AJAX: readonly state textbox

I currently have an "Edit" button and a "blah" textbox in the ajax refresh panel. is it possible to set an asp.net Readonly textbox via a trigger?

0


source to share


3 answers


Yes it is possible.



Assuming the trigger is an onclick edit button, put the code there ...

+1


source


While the button fires the refresh panel, all you have to do is set the read only property to true in the button's click event handler.



0


source


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.

0


source







All Articles