Quantcast
Channel: how to enable disabled linkbutton
Viewing all articles
Browse latest Browse all 7

Re: how to enable disabled linkbutton

$
0
0

This may have to do with the "disabled" attribute. When you add the "disabled" attribute, you should be able to set it to either "disabled" or "true" and when you enable the button, remove the attribute entirely.

protected void LinkButton1_Click(object sender, EventArgs e)
{
       //Disables the button
       LinkButton.Attributes.Add("disabled", "disabled"); //or try .Add("disabled","true");
       LinkButton.Enabled = false;
}

protected void LinkButton2_Click(object sender, EventArgs e)
{
       //Enables the button and removes the disabled attribute
       LinkButton.Attributes.Remove("disabled");
       LinkButton.Enabled = true;
}

Viewing all articles
Browse latest Browse all 7

Latest Images

Trending Articles



Latest Images