a developer's notes – a semi-technical web development BLOG

September 5, 2011

Enabling a Server Side Disabled Control via Javascript

Filed under: ASP.NET,Javascript / JQuery — Duy Nguyen @ 1:11 pm
Tags: , , , , , ,

I had a ASP.NET check box that I disabled on the code behind code like this:

myCheckBox.Enabled = false;

I wasn’t able to enable it via javascript like this:

myCheckBox.ClientID.disabled = false;

Instead of using

myCheckBox.Enabled = false;

from my code behind. I used this instead

 myCheckBox.InputAttributes.Add(”disabled”, “disabled”);

I got this info from Jonas Bush’s blog post. Check it out in full detail here.
Click Here

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: