Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi I have problem in enabled as false for link button in chrome and Mozilla,if i run website and move cursor to link button it not show hand symbol but i can click that link,but same in IE 8 i cant click link button.

Why in chrome and Mozilla not work correctly ?

and my code below and i write in server side
VB
lnkAddUser.Enabled = False
lnkImpADUser.Enabled = False


below is codebehind
XML
<asp:LinkButton ID="lnkAddUser" runat="server" Font-Bold="True" Font-Size="15px" Font-Underline="False" ForeColor="Black" OnClientClick="return AddUser_ClientClick()">Add User</asp:LinkButton>

<asp:LinkButton ID="lnkImpADUser" runat="server" Font-Bold="True" Font-Size="15px" Font-Underline="False" ForeColor="Black" OnClientClick="return AddUser_ClientClick()">Add User</asp:LinkButton>


i will use OnClientClick="return AddUser_ClientClick()

Pls reply asap
pls replay anybody


Regards
Aravindb
Posted
Updated 10-Nov-13 22:15pm
v5

1 solution

I'm sorry to say that by if IE 8 lets you click a disabled (Enabled = false -> Disabled) button that the problem is with IE 8.

I have no IE 8 but in any case, by definition you should not be able to click a button that disabled...
 
Share this answer
 
Comments
Aravindba 17-Nov-13 3:51am    
pls try in chrome and mozila with onclientclik event in client side for link button and hyper link.for buttons and some other control cant click if disabled,but link button and hyper link can click even it disabled.pls try in chrome and mozila
Kornfeld Eliyahu Peter 17-Nov-13 4:54am    
We had a some misunderstanding here. Enabled = false, will render the link button disabled in manner of serer side control. Means click will not rise server event. However it will not disable the client side click event for the tag created form the server control...
Aravindba 17-Nov-13 20:04pm    
then how to solve it ?.my need is if disabled = false form server side,in link and hyper link onclientclik event not to rise.
Kornfeld Eliyahu Peter 18-Nov-13 1:17am    
What do you want to do with onclientclick when link button IS enabled?
(Should it be that you confused with onclick and onclientclick?)
Aravindba 18-Nov-13 1:47am    
actually i am not use onclik,i will use only client side click event,pls check this link and paste all code and check it
http://www.codeproject.com/Questions/673877/Why-below-code-correctly-work-in-IE8-and-not-work

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