Web Control On... Event

C

C CORDON

I wonder if those events that controls show on HTML code On... can be bound
to a Javascript, if not...what use is there to them. If they can call
JavaScripts how is this done because I am gettong this error when adding
OnCheckedChanged="get()" to a checkbox.

'get' is not a member of 'ASP.Anuncio_aspx'

TIA
 
K

Ken Dopierala Jr.

Hi,

You need to add an attribute to your check box in your code behind. For
example in the page load enter this:

chkBoxName.Attributes.Add("onClick", "get();");

That will run your javascript get(); function when the user clicks the check
box. In that routine you would then test to see whether the check box is
checked or not and run the appropriate code. Good luck! Ken.
 

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

Forum statistics

Threads
473,816
Messages
2,569,706
Members
45,495
Latest member
cberns21

Latest Threads

Top