Calling a server method from the client with Ajax.NET Professional, it works but....

Okay, I'm not sure if this belongs in the Ajax Control Toolkit section or in here.  It does deal with the control, but I think it deals more with Ajax.NET Professional.  I'm sorry if it is in the wrong spot. 

I've been trying to figure out how to enable/disable a bunch of animationExtenders whenever an object's onmouseover event fires.  Here is the solution that I ended up using:

First, I am using Ajax.NET Professional.  I based my solution off of the following example:

I have all of my AnimationExtenders disabled as their default state (defined on the ASP side).

Here is my method that I am calling from the C# code:

        public void lblCopperIncentives_MouseOver()
            OpenCopperIcentiveAnimation.Enabled = true;

 Here is the method that I am using to register the C# method so that the client-side JavaScript will be able to use it:

        protected void Page_Load(object sender, EventArgs e)

 Here is the JavaScript that I am using to facilitate the calling from client to server:

    <script type="text/javascript">
        function callCopperMouseOver()
        function getServerTime_callback(res)
          var storage = res.value;

 Finally, here is a definition of a control that is using the setup: 

    <asp:Label ID="lblCopper" runat="server" onmouseover="callCopperMouseOver()" 
        Text="Irrelevant text"></asp:Label>

I am using a Master Page - Content Page setup. The script is defined as the first thing under a contentPlaceHolder.

Okay, so I think that I have provided all of the pieces of the puzzle. Now for my problem:

The event fires fine, the method executes in C#, and the Enabled property gets set to true.

However, the AnimationExtender does not fire at this point. I'm not sure if maybe somehow the Enabled Property is returning to it's default property of False or if the event that activates the animation that I have defined for the AnimationExtener is firing.

I'm thinking that it may be one of these two things, but then again I may be absolutely clueless about it. In any case, could someone please lend me their expert assistance?

Thanks in advance.

7/31/2008 3:59:34 PM 13973 articles. 1 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 27

I'm sorry if it is in the wrong spot. 

You can try in the correct forum to get more answers than here, like: Google group Ajax.NET Professional. Wink

Or just use for this task an ajax page method?

8/1/2008 10:14:30 AM

Thanks for the link.  I posted this exact problem there and was banned from the group before it ever went up...  Not quite sure what that is all about.

Anyway, as for the suggestion for using the ajax page method, I attempted that as well and got the same result.  The method is called succesfully by the javascript function

and the .Enabled property is set to true, but the AnimationExtender still never activates.

Just in case, here is the code that i used:

        public static void lblCopperIncentives_MouseOver()
             //I had to declare a class level private static 
             //variable which I set during page load with
             //_openCopperIncentiveAnimation = this.OpenBronzeIncentiveAnimation
             //(Sorry but I'm desperate :)

             _openCopperIncentiveAnimation.Enabled = true;
  And I have the javascript function that calls it:

      function callCopperMouseOver()

8/1/2008 4:08:21 PM

Okay, now I'm really confused...

I set a watch on "_openCopperIncentiveAnimation.Enabled" as I was stepping through my debugging.

When this line of code executes:

_openCopperIncentiveAnimation.Enabled = true;

The value, according to the watch at least, never changes from false to true. 

8/1/2008 6:03:09 PM

Similar Artilces:

Old AJAX in .NET 1.1 compatibility with .NET framework 2.0. Ajax does not work always ....................
Hello,I have converted the web site from .NET 1.1 to .NET 2.0. Some of the pages in the web site use AJAX which was developed in .NET 1.1Ajax does not work smoothly in .NET 2.0. Do I have to use ATLAS or is there any fix I can use to make the AJAX work ?Please let me know. Many thanks in advance. Nick..........

ajax .net 2 after ajax call is done how to call JS alert
 helo guys, i'm new herekindly let me know, i've used the folowing but no alertin debug i saw cursor is coming but no alert     Dim strScript As String = "<script language=JavaScript>"        strScript += "alert(""" & StrMessage & """);"        strScript += "</script>"        If (Not Page.ClientScript.IsStartupScriptRegistered("Alertscript")) Then   &nb...

Does AJAX.NET work with SQL server connections?
All, I have an application that uses SQL server as backend. The application has 5 drop down lists and the contents of the bottom 4 list depends on the item selected in drop down list 1 (think of it as cascading drop down lists if you will). Each of these lists pull data from a SQL database. The application works fine - the only issue is the delay in pulling data. I tried to "ajaxify" this (by including a ScriptManager, UpdatePanel and doing the necessary web.config edits), but it doesn't do the trick.Is there a better solution for this? I looked at the Cascading drop down ...

Ajax.Net Autocomplete is not calling web method
Hi, I am using autocomplete on a textbox. I have a web service named OccupationList.asmx in my project which is running well while testing separately. I have also added its web reference to my project. It seems like web service is not calling from here. aspx code is like here - <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> Occupation: &nbsp;<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <cc1:AutoCompleteExtender ID="TextBox1_AutoCompleteExtender" runat=&q...

Client vs. Server Side AJAX.Net
I am curious to know what the advantages and disadvantages are to using the client side declarative style AJAX controls vs. the server side.  I can't seem to think of too many reasons why I would go to the client side libraries when I can use all the power of ASP.NET (debugging, compiling, controls) and just wrap them in a UpdatePanel.   It also seems kind of counter productive to use the client side libraries because they don't utilize all the cool new developments of ASP.NET.  Am  I missing something?  Do the client AJAX libraries give you more flexibility?  Can the two, client and server libraries, be used together in one site?  Just curious to see how people are using one vs. the other and the benefits.  Thanks-   Hi,while everyone has got its opinions and feelings about the server-centric and client-centric programming models, IMHO one thing must be stated clearly: all the MS AJAX stuff is built on top of the client-side library, from the UpdatePanel to all the Control Toolkit extenders (that wrap special client-side components called "behaviors") to the drag and drop functionality, templated client controls, bindings, transformers, declarative syntax, animations...The power comes from the client-side library :) Alessandro Gallo | Blog | My book: ASP.NET AJAX In Action IMHO with the server side approach using UpdatePanel you have more productivity, because you can work as...

Does anyone know of either an blog available or an 'inline editor' for
Hey all:  I'm desperately trying to find an AJAX control (I don't care if it's currently for ASP.NET AJAX.NET, since if not, I'll do the conversion and make it available to others) for creating blogs and another inline editor control, so that if there is text on the page, I can click on the text and it will automatically display an editor and allow me to edit the text/html.  Does anyone know of a control like this that's AJAX enabled?  Especially AJAX.NET.  I'm only interested in open-source, since any improvements I make I will make available on Thanks in advance for any pointer to a download page or pointers to a control that could be enhanced to do what I want... Anyone?  Buehler?  If anyone is looking for one, if I can find a reasonable facsimile, my work on it would benefit you too. ;-) <Most> all of the text editors out there are 'ajax' enabled - just not Microsoft Ajax enabled.  All of the popular ones like tinyMCE, FCKEditor and FTB (FreeTextBox) can be used with Microsoft Ajax by utilizing a 'wrapper approach'.  John Dyer (FTB author) was at one time looking for someone(s) to assist in getting FTB 3.0 compatible with Ajax before rolling out his new version...Other than that if I remember correctly in the MSDN Magazine archives was an article on creating a 'rich text' editor control. Those that do not use those use third party commercial components...hence why no real answers to this question.......

Client Call back or AJAX.NET.... Which is the better option?
Hi, Please guide me which is the better option between client call and Thanks in advance NarIf you keep your feet firmly on the ground, you'll have trouble putting on your pants! Check out this link: Hope this helps, VivekSocial Networking Platform in ASP.NET || Join now: CodeASP.NET Community Please mark the most helpful reply/replies as "Answer"....

Web Server Controls
Is there any documentation showing what is required to equip a server-side WebControl to work with AJAX.NET?   I have some VERY simple WebControls that fire "Click" events.   One of them consistantly causes the entire page to refresh, while the other doesn't.   But they are both doing the same thing.    For some reason, one seems to not work with AJAX.NET, while the other does.    Both of them are wrapped inside an UpdatePanel and ContentTemplate - but behave differently under AJAX.NET.   Mysterious. I can't tell if the examples showing ScriptControlDescriptor.AddEvent are relevent for what I'm doing or not.   This seems to be related to very specific client side javascript voodoo  - I just want to have a generic control that can fire events that will postback to the code-behind (like a normal ASP.NET button, for example - I can drop one of these on a page, use the event, and it just works - but how to do this properly with a custom WebControl - RELIABLY?). If there is a plain-jane, simple example of a WebControl and the proper way to have it fire events (__doPostBack) without causing the entire page to refresh, that would be VERY helpful.  Thanks.   There's lots of examples of how to do this outside the webcontrol, so to do it inside a webcontrol all you really have to do is embed the javascript in the assembly and make sure that it ends with the if(Sys &&am...

How to call server side function by javascript using Ajax.Net
Sir, I want to call the server side function by javascript function. Is it possible using Ajax.Net (System.Web.Extensions.dll or AjaxControlToolkit.dll)? If yes then please give me the code or URL. I found some article using Ajax.dll but I want to use System.Web.Extensions.dll or AjaxControlToolkit.dll. Please help me. Thanks in advance Paresh        Hi, Ajax.NET and ASP.NET AJAX, what you want, are completely different implementations so please be sure to use the correct terminology in the future as there are already 100+ AJAX frameworks aroun... doesn't work on production server?
So everything works perfectly on my dev computer (even in iis on XP), but it won't work at all on the production machine.  Here are the errors I've gotten and what I've done. First I got an error saying it can't find an assembly, so I added System.Web.Extensions and System.Web.Extensions.Design to the bin folder.  Why aren't these assemblies added automatically and why would it work on the development box with out the assemblies in the bin folder but it won't work on the production server? After I did that I got a message about how my pages weren't precompiled after I did a publish and copied the files from PrecompiledWeb?!  Again after publish the site worked on my XP machine IIS, but some how copying file from dev to production causes them to become unprecompiled?  I ended up checking the "Allow this precompiled site to be updatable" and I don't get the precompile error. Now I have a problem where I get an IndexOutOfRangeException in production that just doesn't exist dev and I have no idea what is causing this one. What am I doing wrong and why is it so hard to move this to production?   Ok, now for reasons I do not understand I no longer get the IndexOutOfRangeException, but I'm getting a FileLoadException saying Could not load file or assembly 'System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The l...

Troubleshoot Web Service; Ajax AutoComplete events do not appear to not fire; Ajax web service appears to not work. .NET
Folks, I had the situation that Ajax AutoComplete events in the web service did not fire after I copied a project out of a folder, renamed it and moved it to a server. The fix was hard to find but easy to solve. I had some web service modules in an ASMX file that provided AutoComplete entries -- i.e., after the user keys in 2 or 3 characters, the list of possible entries with those leading characters is displayed for the user to select. To solve the problem, look at the web service's directive, not the code-behind or the ASMX designer.  Do a right-mouse-click on the web service, in my case named AutoComplete.asmx, and open with Notepad if nothing else. It showed: <%@ WebService Language="vb" CodeBehind="AutoComplete.asmx.vb" Class="FORMERPROJECTNAME.AutoComplete" %> I changed 'FORMERPROJECTNAME' to 'CURRENTPROJECTNAME', and it once again worked like a champ. Hi, Thank you for your post! As we all know, the namespace name for a project is the project name by Thanks again for sharing your solution.  Best Regards,Sincerely,Jin-Yu YinMicrosoft Online Community Support Thanks so much!  I'm embarrassed to admit that I spent 3 hours trying (unsuccessfully) to debug this on my project.  You hit the nail on the head.  I had also copied a working AutoComplete from another project, and apparently messed up when I renamed it.  The error is ...

AutoCompleteExtender : calling web method problem after installing AJAX.NET Beta 1
Hello,I have problem with accesing web services after installing AJAX.NET Beta 1.AutocompleteExtender just stopped working. I traced problem with Fiddler: browser tries to POST to this address:POST /WebServices/UserNameService.asmx/js/GetUserNamesList HTTP/1.1When I try to open url http://localhost/WebServices/UserNameService.asmx/js  in browser, I am being redirected to my custom 404 page. The problem is probably here, because server must return javascript in this case.I appreciate any help.RomanDefault.aspx...<asp:TextBox ID="TextBox1" runat="server"></asp...

Trying to get a 2.0 site (with AJAX.NET) working on Server 2000
I recently wrote an application using AJAX.NET (and obvioulsy .NET 2.0).  When I went to publish the site on the server I realized that neither .NET 2.0 or AJAX.NET were installed.   I downloaded both and installed.  Rebooted the server to be sure.   After I created the virtual directory, I went to check the site.  I got a parse error ont he web.config file, immediately I realized that I forgot to set the site to 2.0 from 1.1 (like I do EVERY SINGLE TIME, but that is not here nor there).    The wierd thing is, is that once I switched over to 2.0 when...

Starting an Application in .net
i am new to could any one give me simple ajax,net example so that i start building on my ajax skills please.........  I started with the todolist video on the main page, and its all you need to know to get started. Don't forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.    Please remember to click “Mark as Answer” on the post that helps you.This can be beneficial to other community members reading the thread.Thanks,Ron...

Call to non .net COM not working after .NET
I have developed small samples of ASP.NET and one of them I tried to call a standard COM (non .NET). I took the code out for now, but a call to that COM from traditional ASP application now does not work. Does anyone have an idea how to correct this?...

Ajax, .Net, and Server question
I am hosting websites using Server 2003 Standard Edition.  I host primarily ASP.NET websites and the majority of .Net 2.0.  What do I need to do if someone developed a website with Ajax in it for me to be able to host it, or can I do it as-is the way I am doing stuff?Robert Williams, OwnerWilliams Web Solutionswww.williamswebsolutions.netWebsite design & redesignWebsite & e-mail hosting  If the site is developed using Microsoft's ASP.NET AJAX, you must install ASP.NET 2.0 AJAX Extensions 1.0 on the server, since the framework is installed in the Global Assembly C...

Ajax.NET Professional ABANDONED
Michael Schwarz the guy behind Ajax.NET Professional has in his latest blog officially declared that "he will no longer be able to maintain Ajax.NET Pro" and that he has officially abandoned the project. Read more about the news here;Ajax.NET Professional ABANDONED From several people here on the comments (and in other blogs) have stated; Ajax.NET Professional is not technically dead since it is a CodePlex project, though all the three people with write access to the repository have (as of today) not done ...

How to AJAX.NET website to server?
What exactly is needed to move my AJAX.NET website from my development machine to the central production server? Does AJAX.NET and the Control Toolkit have to be installed on the server as well? I'm hoping there's a way to host it w/o any additional software installation, because cutting through the red tape is going to be tough...   Thanks! Only the AJAX.NET (I assume you use the Microsoft ASP.NET AJAX implementation) must be installed on the server. The control toolkit is a separate DLLRichard the AJAX.NET (I assu...

question on Ajax and .NET method
hi all, is it possible to pass a javascript object (which has key value pairs) to a C# method through an Ajax call. if yes, can you please give me some sample code on how to refer to those key values in C# method?   Thanks in advaance Sanjay Using AJAX, you are making a call to the server. Your key value pair in Javascript is serialized in to string with some dilimeter when sent to the server right? I guess, you just need to parse the string on the server! thanks for the reply  the key value pair is not serialized  into a string. it is a java...

AJAX.Net not working in IE7
Hi all! Super nOOb here! Perhaps this is has already been answered,  but please forgive this nOOb. Problem:  I have a site with 1 master page and several content pages. When using the Accordion control(from the Ajax toolkit)it works great in Firefox 2.0, but not in IE7. I built it just like in the Vid tutorial(with the exception of using master pages). The links in the header do Not fire in IE7, but they work great in FF2.0 Any suggestions/ help would be greatly appreciated. TY Hi, can you please provide the least amount of relevant code to reproduce the error? Without code...

AJAX not working on deployed server, but works on test server
Hello, I tried to search on this question, but I'm not sure how to form it, so if it has been answered, my appologies. I had an application developed by a 3rd party company using ASP.NET (2.0, C#) and AJAX.  On their test server the AJAX is working.  I have a page that has three drop downs.  The top drop down populates the second and the second populates the third.  On my production box, the app is not getting the new data for the second and third drop downs.  (But it does on the test server)  I am running MS 2003 server with IIS and ASP.NET and AJAX insta...

adding Ajax to my non-Ajax .NET web site
Hi all I've a site that i developed by .NET (visual 2005 - and want to add Ajax into the pages now. I've downloaded required AJAX tools and be able to develop AJAX enabled pages but want to integrate ajax features to existing pages. Could you please help me how i can do this? Thanksmcb Look at the videos here:  (number 7 in particular)Steve Wellens My blog if a web site is a normal asp web site then u have to add these lines in web.config under the system.web tag         <httpHand...

Calling Server Side VB.NET code with Javascript just to call a sub method
Hi, Can anyone please give me a clue on how to call my Server side  CalculateResult() method from Javascript code when onchange event is fired??  thanks in Advance Dollarjunkie.Net Web/Software Engineer You will have to use AJAX.  Is there any reason why the CalculateResult logic cannot be handled by Javascript? Best regards...Josh Stodola ← Come check out my blog! The reason is this... I need to have the code go get information based on what is retrieved and then do some calculations based on that and then display the information in one of my controls. I am n...

AJAX not working on server, works on test server and developer machine
I use ASP.NET AJAX on my web page. The page consists of two textboxes and two buttons. Textbox 1 is within an update panel triggered by button 1 and the other textbox is updated by full page postback caused by button 2. This works perfectly on my developer machine and on a test server (W2K3) but when I publish it to the real server (W2K3 Server) the page always posts back when clicking button 1 instead of just updating the textbox within the update panel. When I look at the source of the generated page in the browser I see that the server version of the page does not include a...

Web resources about - Calling a server method from the client with Ajax.NET Professional, it works but.... -

Professional - Wikipedia, the free encyclopedia
In narrow usage, not all expertise is considered a profession. Although sometimes referred to as professions, occupations such as skilled construction ...

Criminal lawyer Alex Lewenberg guilty of professional misconduct after asking sex abuse victim not to ...
VCAT judge condemns Alex Lewenberg's 'truly shocking' suggestion that Jewish community should close ranks over notorious paedophile's criminal ...

Michael Lawler's Four Corners appearance did 'devastating damage' to his professional standing: report ...
Michael Lawler &quot;destroyed public confidence&quot; in his ability to hold high quasi-judicial office and behaved &quot;dishonourably&quot; ...

Criminal lawyer Alex Lewenberg guilty of professional misconduct after asking sex abuse victim not to ...
VCAT judge condemns Alex Lewenberg's 'truly shocking' suggestion that Jewish community should close ranks over notorious paedophile's criminal ...

Michael Lawler's Four Corners appearance did 'devastating damage' to his professional standing: report ...
Michael Lawler "destroyed public confidence" in his ability to hold high quasi-judicial office and behaved "dishonourably" by participating in ...

Most IT professionals believe current privacy and consent tools are inadequate
The regulatory environment for data is in a state of change at the moment with many countries introducing legislation to control the flow of ...

Professional Chinese hackers are responsible for U.S. ransomware attacks
Ransomware is a kind of cyber attack that’s growing in popularity. Here's how it works: hackers infiltrate computers, encrypt files you want ...

A woman who's been a professional athlete, banker, filmmaker, restaurateur and CEO reveals 5 keys to ...
For THINX co-founder and CEO Miki Agrawal , success is hard-won. And it's a journey. The former investment banker, athlete, filmmaker, and restaurateur ...

New York clears way to allow professional MMA
New York's Assembly voted to legalize mixed martial arts, clearing the way for fights and expanding the combat sport into the last state to still ...

Are professional influencers impactful?
Olivier Blanchard started a conversation yesterday on Facebook by positing that professional influencers may not move the needle for the brands ...

Resources last updated: 3/26/2016 9:55:13 AM