Client side scripting with ASP.net server controls

  • Thread starter Thread starter e
  • Start date Start date
E

e

What client side langauge are you using? Javascript enable/disable syntax
would be this:

myObject.disabled = true;

And I'm guessing vb scripting would be this:

myObject.enabled = false

Sounds like you're attempting "myObject.enabled = false" in javascript?
 
You can do that, but your results may be more complicated and unexpected
than you think. ASP.Net is designed to make these sort of changes from the
server side, and bypassing it can sometimes lead to unexpected results.
ASP.Net is optimized to make PostBacks far less costly than ASP Page
requests did, which required re-interpreting the VBScript with every
request. I personally feel that it is better to try to work within the
constraints of the architecture of the technology, as a general rule.

However, if the enabled/disabled state of the client-side HTML object has no
effect on much of anything else, you can certainly use JavaScript to do it.

--
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Hi:

I would like to avoid a round trip to server for small things like changing
enabled status of a dropdown list ASP.NET control. Can I apply client side
scripting to change this property? Using the client side debugger, I see I
can get a reference to control, but enabled property is not supported.

Charlie
 
Back
Top