G
Guest
I have a web application built in .NET Framework 1.1. The application has
alot of content so I need to avoid postback at all costs.
The application has a javascript file which handles disabling and enabling
controls based on specific values of other controls.
I also have alot of ASP.NET validation controls which are executed when you
click the submit button.
My problem is that in the ASP.NET validations I need to know if that control
is currently disabled or enabled to know which type of validation to perform.
I have researched this problem and have seen peoples solutions by using
document.getElementById("control").setAttribute("disabled","true") to mimic
the way .NET handles the enabled property. But I have had no luck attempting
it using this way. I also placed span tags around my controls and used
document.getElementById("control").parentElement.setAttribute("disabled","true") but still no luck.
I have a last resort of having tons of hidden textboxes that I can
read/write through javascript or .NET to tell what the status is but this is
a ugly solution which I would like to avoid.
If javascript appends disabled as an attribute to the input control why cant
..NET be aware of that change in the controls attributes properties?
--
Regards,
Shaun Goldston
Liberalism is treason!
Vote Republican
alot of content so I need to avoid postback at all costs.
The application has a javascript file which handles disabling and enabling
controls based on specific values of other controls.
I also have alot of ASP.NET validation controls which are executed when you
click the submit button.
My problem is that in the ASP.NET validations I need to know if that control
is currently disabled or enabled to know which type of validation to perform.
I have researched this problem and have seen peoples solutions by using
document.getElementById("control").setAttribute("disabled","true") to mimic
the way .NET handles the enabled property. But I have had no luck attempting
it using this way. I also placed span tags around my controls and used
document.getElementById("control").parentElement.setAttribute("disabled","true") but still no luck.
I have a last resort of having tons of hidden textboxes that I can
read/write through javascript or .NET to tell what the status is but this is
a ugly solution which I would like to avoid.
If javascript appends disabled as an attribute to the input control why cant
..NET be aware of that change in the controls attributes properties?
--
Regards,
Shaun Goldston
Liberalism is treason!
Vote Republican