Click here to Skip to main content
15,921,276 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want enabled all controls mns textbox,buttonc,dropdownlist on button click...mns all controls enabled at one time.i have multiple textboxes so, i cant write every textboxid.enabled=true..it is very tedious job.plz help me?
Posted
Updated 10-Dec-12 18:19pm
v4

Hi,

Put it all the controls in panel
On button click
write
panelid.Enable=true;
 
Share this answer
 
v2
You can try enabling all controls using Jquery on single button click.Just give same class name to each control which you want to enable at a time on single click.

XML
<html>
<head>
<script src="jquery.js"></script>
<script type="text/javascript">
var submit_Click=function(){
   $(".class1").attr("disabled", false);
}



</script>
</head>
<body>

<form>

<input type="text" value="tdfgfhfhgfhgf" id="txt1" class="class1" disabled="true" >
<input type="textarea" value="tdfgfhfhgfhgf" id="txt2"  class="class1" disabled="true">
<input type="text" value="tdfgfhfhgfhgf" id="txt3"  class="class1" disabled="true">
<input type="text" value="tdfgfhfhgfhgf" id="txt4"  class="class1"" disabled="true">

<input type="button" value="Submit" onClick="submit_Click();">

</form>

</body>
</html>
 
Share this answer
 

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