Dipa Ahuja

Dipa Ahuja

  • NA
  • 3.1k
  • 713.8k

profile status

Feb 13 2010 8:49 AM
hi... i want to code like orkut profile status 

there are one textbox two buttons(Edit/Update,cancel)

as you know when we click on edit the textbox's read only=false and when click on update textbox become read only..

i tried it but when click on update the textbox text disappears..

home.cs



 ProfileCommon p;

 protected void Button1_Click(object sender, EventArgs e)
    {
        if (Button1.Text == "Edit")
        {
            TextBox1.ReadOnly = false;
            Button1.Text = "Update";
        }
        else if (Button1.Text == "Update")
        {
    TextBox1.ReadOnly = true;
            p.status = TextBox1.Text;
            Button1.Text = "Edit";            
            
        }
    }


Thanks !

Answers (3)