You are currently browsing the tag archive for the ‘AJAX’ tag.

ModalPopupExtender: .Show() not working!

Are you having problem with your ModalPopupExtender.Show() method working in other project but not on this project?

Do not set the hidden button to false; it wont render on client at all!

Set property Style=”display: none”, like following.

Happy coding!


While sitting in just another meeting with another lead developer, I was told that they are using UpdatePanels with jQuery just because they read it somewhere over the internet.

I threw them with PageMethods alternate solution; (although it can be script’ize using ScriptManager.RegisterClientScriptBlock), especially when used with jQuery. To my bewilderment she did not know about the PageMethods; and I was gladly eager to tell her more! (0:

It is not “just another” way of interacting with server; its reliable, and communicates in the shortest forms possible – lowest client/server data exchange; plus, the response by the WebMethod gives the freedom to manipulate and interact with the HTML the way we want.

Its a static method that is exposed using WebMethod attribute; and is called using Javascript. Follow the following steps:

1. Set the `.EnablePageMethods` property of ScriptManager to True.

2. Mark the static method with WebMethod attribute
3. Call method using javascript. Like:


function Incase_Success(results/*Returned by the method call*/ , userContext, methodName) {

function Incase_Failure(errors, userContext, methodName) {

The PageMethod calls the web method MyMethod with the defined number of arguments, and upon successful completion of the function call, it redirects the response to SuccessFunction or FailureFunction according the status that it has.

When calling the method, the first N parameters in the PageMethods call matches the parameters of the class method. In this example we have only only one parameter.

There are two optional parameters that takes the names of the methods to be called in case of failure or success. The callback for success, followed by the callback for failure.

Following is a quick comparison between UpdatePanel, and PageMethod from Encosia.

PageMethod data exchange,

An important point to note, is that most of us relate the the term web service with SOAP and XML. But in this case ASP.NET AJAX doesn’t use SOAP and XML.

Btw, this article is a MUST READ!

Happy coding!

Briefly, the solution works as follows: the crawler finds a pretty AJAX URL (that is, a URL containing a #! hash fragment). It then requests the content for this URL from your server in a slightly modified form. Your web server returns the content in the form of an HTML snapshot, which is then processed by the crawler. The search results will show the original URL.

Source: is a new startup, providing free ajax loader icons that comes handy when you in the middle of a development! The UI is simple and easy, but with quite a number of ad’s distracting attention. But nothing comes for free… use it to find the icons you need right away and on the fly!

Google ajax language api, an excellent online tool for myself for webdevs.

Something strange, live comments on domain.

Try, and view the source code here

%d bloggers like this: