Skip to content

How to disable textbox?

Santhosh K S

Asked Apr 24, 2012, 11:27 PM EDTSolved
Share
LinkedInX
how to disable text box after press enter some event(return in javasscript) occure ,then i need to disable textbox or hide on client side

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Senthilkumar
    ✓ Accepted answer0
    Hi,

    You can disable the control in the client side,

    document.getElementById('txtbox').disabled = true;


    You can hide the control in the client side,

    document.getElementById('txtbox').style.display= 'none'; 

    If you want to do it server side then write the text box change event and set the following,
    txtName.Enabled = false;
    0