Client side scripting with ASP.net server controls

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?
 
K

Kevin Spencer

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.
 
C

Charlie@CBFC

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top