I want to disable link button after clicking of it & other enable. toggle enable/ disable between both link buttons using c#
+1
A:
Subscribe to Click event of this buttons and set Enabled property to true or false.
void LinkButton_Click(Object sender, EventArgs e)
{
// First enable all buttons
btn1.Enabled = true;
btn2.Enabled = true;
// Then disable the clicked button
(sender as Control).Enabled = false;
...
}
This is just an example of how you can do this. Can be optimized...
masterik
2009-02-19 10:44:08
A:
To disable a link button you should assign false to its Enabled property:
button.Enabled = false;
There is also an example how to hook OnClick event in the linked MSDN article.
Alexander Prokofyev
2009-02-19 10:44:45
my page contains links like this-<a href="page1">One</a><a href="page2">Two</a>so. how to do? using javascript or css?
Yogini
2009-02-19 11:02:29
My answer was in therms of ASP.NET and C#. For Javascript answer you should reformulate the question.
Alexander Prokofyev
2009-02-19 11:14:14