Geeks With Blogs

Soppa Group India
iSmart Panache Inc
R Systems Internationals Ltd
Technovate eSolutions Pvt Ltd
The contents of this blog are my personal opinion and do not represent in any way the view of my employer.
These postings are provided "AS IS" with no warranties, and confer no rights.

Google PR™ - Post your Page Rank with

Narendra Tiwari

Its not that simple as calling webservice methods from Input button or server-side button control click event.

Here I found pageLoad() (case sensitive) event  which is specifically accomodated with Atlas to support the javascript "onLoad" events e.g. calling a WebMethod from onLoad event of body element.

Only "pageLoad()" can call the WebMethod in the following example:-

<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
html xmlns="" >
head id="Head1" runat="server">
<title>Untitled Page</title>
<atlas:ScriptManager ID="scriptManager" runat="server" EnableScriptComponents="false" >
<atlas:ServiceReference Path="SimpleService.asmx" Type="text/javascript" />
<script type="text/javascript" language="JavaScript">
//if we call this on body onLoad will raise error
function OnStart() {
//Call script proxy passing the input element data
requestSimpleService = Quickstart.Samples.SimpleService.EchoString("Hello",OnComplete);
return false;

//only pageLoad will call the webmethod
function pageLoad()
//Call script proxy passing the input element data
requestSimpleService = Quickstart.Samples.SimpleService.EchoString("pageLoad event is supported by Atlas!!",OnComplete);
return false;

function OnComplete(result) {
body onload="pageLoad()">

<form id="form1" runat="server">

Posted on Wednesday, March 8, 2006 9:35 AM .Net | Back to top

Comments on this post: pageLoad() event in Atlas

# re: pageLoad() event in Atlas
Requesting Gravatar...
Good info, Thanks.
Left by mano mangaldas on Jul 31, 2006 4:17 PM

# re: pageLoad() event in Atlas
Requesting Gravatar...
Crazy but true - i just don't understand why they'd have to do it this way.
Left by nitin ahuja on Sep 22, 2006 10:26 PM

Your comment:
 (will show your gravatar)

Copyright © Narendra Tiwari | Powered by: