Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to write javascript coding for asp.net content page how to do that?..
Posted

1 solution

 
Share this answer
 
Comments
GeethaSG 22-Mar-14 4:37am    
With this i have attached the sample code for your reference.
This is the code which i have used in my content page.
<asp:CheckBox ID="chkSales" Checked="false" onclick="enableDisable(this.checked, 'txtSales');" runat="server" />
<asp:TextBox ID="txtSales" runat="server" Enabled="False" Width="58px" />

Then for onclick event i have written an javascript code which is:


function enableDisable(bEnable, textBoxID)
{
document.getElementById(textBoxID).disabled = !bEnable

}
My question is how to call this script inside the asp.net content page?..

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