Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
i have a linkbutton, i am disabling the linkbutton at server side,
but when user type a text in a textbox and leave the control,
then i am enabling the the linkbutton at client side, but when i clicked the
linkbutton, it does not fire server side event.
can any one tell me,
how to enable the linkbutton to fire the server event when clicked?
Posted
Updated 19-Jul-11 23:44pm
v2
Comments
Toniyo Jackson 20-Jul-11 5:55am    
Please paste your code also.
amit_83 20-Jul-11 8:31am    
function EnabledButon(){
var btnCreate = document.getElementById('<%=btnCreate.ClientID %>');
btnCreate.disabed=false;
}

at server side
i am doing
btnCreate.enabled=false;
shakil0304003 20-Jul-11 7:33am    
need your code!
amit_83 20-Jul-11 8:31am    
function EnabledButon(){
var btnCreate = document.getElementById('<%=btnCreate.ClientID %>');
btnCreate.disabed=false;
}

at server side
i am doing
btnCreate.enabled=false;

1 solution

Without seeing the linkbutton code, I couldn't even begin to guess other than to suggest that you haven't hooked the click event up to the server side code.
 
Share this answer
 
Comments
amit_83 20-Jul-11 8:31am    
function EnabledButon(){
var btnCreate = document.getElementById('<%=btnCreate.ClientID %>');
btnCreate.disabed=false;
}

at server side
i am doing
btnCreate.enabled=false;
Pete O'Hanlon 20-Jul-11 8:42am    
But how are you hooking up btnCreate? What does your code look like for this? That's where the event hookup should be.
amit_83 20-Jul-11 9:04am    
at .aspx page
<asp:LinkButton ID="btnCreate" OnClick="btnCreateClick" runat="server"
Text="Create">
Pete O'Hanlon 20-Jul-11 9:09am    
But what's your code? What have you put on the web page for this control? Does it look like <asp:LinkButton Text="Click" runat="server" OnClick="btnClick_Click" />.
amit_83 20-Jul-11 9:16am    
yes

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