Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6887101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:50:35+00:00 2026-05-27T05:50:35+00:00

I am working with some controls that are written using microsoft ajax tool kit.

  • 0

I am working with some controls that are written using microsoft ajax tool kit. I want to trigger an event in these controls using jQuery. I was hoping that it should be as simple as triggering any event from jQuery but it does not seem to be working. Here is sample code..

Ajax Control

/// <reference name="MicrosoftAjax.js"/>

Type.registerNamespace("MyNameSpace");

MyNameSpace.AjaxUserControl = function(element) {
  MyNameSpace.AjaxUserControl.initializeBase(this, [element]);
}

MyNameSpace.AjaxUserControl.prototype = {
  initialize: function() {
  MyNameSpace.AjaxUserControl.callBaseMethod(this, 'initialize');
  }
},

dispose: function() {

  MyNameSpace.AjaxUserControl.callBaseMethod(this, 'dispose');
},

_onChange: function(evt) {
  alert('On Change event.');
  },
}
if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();

Jquery Code:

var myJqueryControl = (function ($, AjaxControl) {
  $(document).ready(function(){
  var ajaxEventProxy = Function.createDelegate(AjaxControl, AjaxControl._onChange);
  $("#JqueryCommandButton").click(ajaxEventProxy);
} (jQuery,MyNameSpace.AjaxUserControl));

Its not working, when the button is clicked i cannot see alert message inside onchange. Would appreciate any guidance on how to make it work.

Thanks
CSC

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:50:36+00:00Added an answer on May 27, 2026 at 5:50 am

    It would work much easier if you followed the JQuery widget pattern. Because an AJAX control wraps around an element, much like the widget does, you can more easily integrate the two, by writing some setup with the init method:

    _init: function() {
        //store a control reference within the widget
        this._control = $find(this.element.attr("id"));
    }
    

    Then, in your widget, you can refer to the control via the this._control.

    If you can’t switch models, the way to resolve this is not refer to the type directly, but the instance… instead of passing in the reference MyNameSpace.AjaxUserControl to the constructor, pass in an instance, then you can do:

    instance._onchange();
    

    To invoke the event.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Apparently some vendors (like Telerik) are working on versions of their controls that do
I'm changing the look of some Controls that I use in my Microsoft Surface
I'm working on some application, that uses a TreeView control to represent business objects.
I'm working on some Silverlight controls and I would like to explicitly handle the
Working on some tweaks for a build script, I noticed that the output from
I have been working on some legacy C++ code that uses variable length structures
I'm working on some production software, using C# on the .NET framework. I really
I have a very weird issue. I have a UserControl that has some controls
I am working on a software development project that uses code written primarily in
I'm working on making an iPhone version of an Android app that I've written

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.