Panel Enabled on checking checkbox
-
want to create a Panel in ASP.NET ) with a check box as a header that disables all contained controls when unchecked. How do i so???
-
want to create a Panel in ASP.NET ) with a check box as a header that disables all contained controls when unchecked. How do i so???
You can do it either by server side code or client side code.If you want to do it in server side use OnCheckedChanged event of checkbox. :)
Arun Jacob http://codepronet.blogspot.com/
-
You can do it either by server side code or client side code.If you want to do it in server side use OnCheckedChanged event of checkbox. :)
Arun Jacob http://codepronet.blogspot.com/
I want to work on client side.
-
I want to work on client side.
Add onclick attribute to checkbox and disable controls in the onclick event. something like,
chkName.Attributes.Add("onclick", "return DisableControls();");
:)
Arun Jacob http://codepronet.blogspot.com/
-
Add onclick attribute to checkbox and disable controls in the onclick event. something like,
chkName.Attributes.Add("onclick", "return DisableControls();");
:)
Arun Jacob http://codepronet.blogspot.com/
i can't find click event for a check box plz send me the code for onchange event
-
i can't find click event for a check box plz send me the code for onchange event
In the page load event do like this,
if (!IsPostBack) { chkSelect.Attributes.Add("onclick", "Check();"); }
and in html do like this,
<script type="text/javascript"> function Check() { //write your code for Disabling controls } </script>
haleemasher wrote:
plz send me the code
Another thing is if somebody is giving you an idea then plz just try it out first by using online resources or MSDN help and if you feel any difficulties then we'll help if we know that. Anyway happy to help you. :-D
Arun Jacob http://codepronet.blogspot.com/
-
In the page load event do like this,
if (!IsPostBack) { chkSelect.Attributes.Add("onclick", "Check();"); }
and in html do like this,
<script type="text/javascript"> function Check() { //write your code for Disabling controls } </script>
haleemasher wrote:
plz send me the code
Another thing is if somebody is giving you an idea then plz just try it out first by using online resources or MSDN help and if you feel any difficulties then we'll help if we know that. Anyway happy to help you. :-D
Arun Jacob http://codepronet.blogspot.com/
:thumbsup:
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.