Click here to Skip to main content
15,908,841 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My webform has one textbox as Name and the other textbox as Task code and four buttons i.e., start, pause, resume and done. I need help in disabling the restart and done button if the task code wasn't already started.
Else If the user has already submitted the start information, need to disable the start button. Is it possible to do this. Please help.

What I have tried:

Any help is greatly appreciated.
Posted
Updated 5-May-20 2:57am

Hi

As per i understood i have create one Web Form and Add four button + (Restart button) and then apply some basic condition.

We can improve below code as per over knowledge

protected void btn_start_Click(object sender, EventArgs e)
   {
       btn_start.Enabled = false;
       btn_done.Enabled = false;
       btn_restart.Enabled = false;
   }

   protected void btn_pause_Click(object sender, EventArgs e)
   {

   }

   protected void btn_resume_Click(object sender, EventArgs e)
   {

   }

   protected void btn_done_Click(object sender, EventArgs e)
   {

   }

   protected void btn_restart_Click(object sender, EventArgs e)
   {

   }
 
Share this answer
 
v2
just try to disable the button after clicking and once task is completed you can re-enable the button.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900