searchsanjaysharma
asked on
How to enable disable panel using jquery.
I have the following code,
<asp:TextBox id="txtreceivingreport" Text="" runat="server">
<asp:Pane
I want when the user enters the anything in textbox, the panel should be enabled
<asp:Panel id="p1" runat="server" Enabled="false">
<asp:RadioButton id="rbmale" runat="server" Text="Male">
<asp:RadioButton id="rbfemale" runat="server" Text="FeMale">
</asp:Panel>
<asp:TextBox id="txtreceivingreport" Text="" runat="server">
<asp:Pane
I want when the user enters the anything in textbox, the panel should be enabled
<asp:Panel id="p1" runat="server" Enabled="false">
<asp:RadioButton id="rbmale" runat="server" Text="Male">
<asp:RadioButton id="rbfemale" runat="server" Text="FeMale">
</asp:Panel>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Don't use :
<asp:Panel id="p1" runat="server" Enabled="false">
but:
<asp:Panel id="p1" runat="server" style="display:none">
Now you can use :
<asp:Panel id="p1" runat="server" Enabled="false">
but:
<asp:Panel id="p1" runat="server" style="display:none">
Now you can use :
$("#<%= txtreceivingreport.ClientID %>").keyup(function() {
if( $(this).val().length>0 ) $("#<%= p1.ClientID %>").show();
})
ASKER
ok
You can do using the OnTextChanged event on Text box. And you can handle Page partial rendering using
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="tr
<asp:AsyncPostBackTrigger>