views:

32

answers:

1

Can something like this, borrowed from jQuery, be done without jQuery and with ASP.NET AJAX only?

<a href="nojslink.html" class="clickMe">Click Me</a>

And then in an external JS file:

$('a.clickMe').click(function(){  
   alert('Thanks for clicking');  
});
A: 

Something along the lines of

$addHandler($get(elementName),'eventname',function handler());

So, closer to the example:

$addHandler($get(elementName),'click',function() {alert('Thanks for clicking')});

As far as I know, ASP.NET Ajax doesn't support CSS selectors like jquery, so you would have to do that yourself.

Matt S