1 Replies - 1011 Views - Last Post: 14 November 2012 - 04:54 AM Rate Topic: -----

#1 Rominashima  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 08-November 12

How to enable/disable a text box on clicking a button

Posted 14 November 2012 - 04:45 AM

How can I enable a text box on clicking a button?
firstly I insert the property readonly="true" to the textbox.
what code should i use to set the property readonly=false for the textbox when i click the button
Is This A Good Question/Topic? 0
  • +

Replies To: How to enable/disable a text box on clicking a button

#2 raghav.naganathan  Icon User is offline

  • Perfectly Squared ;)
  • member icon

Reputation: 408
  • View blog
  • Posts: 1,440
  • Joined: 14-September 12

Re: How to enable/disable a text box on clicking a button

Posted 14 November 2012 - 04:54 AM

use the on_click method of the button to set it.

protected void Buttonsubmit_Click(object sender, EventArgs e)
        {
            TextBox1.ReadOnly = false;
        }



regards,
Raghav

This post has been edited by raghav.naganathan: 14 November 2012 - 05:13 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1