Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
See more:
sir please help me

I have a web user control which contains a button ('logout')
I use this web user control in a Ex.aspx and this page contains a button(start)
Now i need to disable button (logout) when i click button (start)

How can i acess a button in webusercontrol from a page in code behind
Posted

1 solution

i think this is what you are looking for

In code Behind of your button (start) click

{
 Button btn = (Button)webusercontrol1.FindControl("logout");
btn.Enabled=false;

}

Happy codding..
 
Share this answer
 
Comments
crazytwister 21-Jun-13 0:24am    
thanks...this is rly working..
Shafeequl 21-Jun-13 0:25am    
welcome...
Rajesh Anuhya 21-Jun-13 0:40am    
HI Dudu, First have my +5 and post your comment by clicking the reply link on the poster's comment, so that they will get a notification.
--RA
Shafeequl 25-Jun-13 2:23am    
Thanks for your wordz...

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