Visual Basic .NET » Web Forms
Doubt regarding AJAX -- Ravindra --


Hello Sir/Madam,
I am Ravindra learning ASP.net and very much interested in AJAX. I am trying to implement AJAX.
But not able to get the output.

I implemented the following steps:

1.Adding the reference AjaxPro.dll.

2.Configuring the web.config


path="ajaxpro/*.ashx"
type="AjaxPro.AjaxHandlerFactory, AjaxPro" />


3.implemented the code and method

private void Page_Load(object sender, System.EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(Ajaxajax.WebForm1));
}


public string GetServerTime()
{
return "Hi I am Ajax";

}

4.Placing the code in HTMLDesigner


5.I also added a javascript file(WebForm1.js) as a new item

and I was confusing to edit which code.
please help me.........
thank you,
Ravindra

-- Joseph Guadagno --



----- Original Message -----
From: "Ravindra"
To: "Ajax.NET Professional"
Sent: Saturday, July 08, 2006 1:33 PM Subject:
Doubt regarding AJAX
You are almost there. You are just missing the JavaScript script code to
call the ASP.NET

Look at the getservertime sample at
http://josephguadagno.net 


Joseph Guadagno
http://josephguadagno.net 


Hello Sir/Madam,
I am Ravindra learning ASP.net and very much interested
in AJAX. I am trying to implement AJAX.
But not able to get the output.

I implemented the following steps:

1.Adding the reference AjaxPro.dll.

2.Configuring the web.config


path="ajaxpro/*.ashx"
type="AjaxPro.AjaxHandlerFactory, AjaxPro" />


3.implemented the code and method

private void Page_Load(object sender, System.EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(Ajaxajax.WebForm1));
}


public string GetServerTime()
{
return "Hi I am Ajax";

}

4.Placing the code in HTMLDesigner


5.I also added a javascript file(WebForm1.js) as a new item

and I was confusing to edit which code.
please help me.........
thank you,
Ravindra
>
 

-- Zihotki --


Also you should add some code to WebForm1.js like this:
HTML
....
<input type="button" name="myButton" id="myid"
onclick="getServerTime"/>
....
JS
..
function getServerTime()
{
Ajaxajax.WebForm1.GetServerTime(_doTimeCallback);
}

function _doTimeCallback(res)
{
allert(res.value);
}
...
and this is all. To add onclick event to asp controls use myControl.Attributes.Add("onclick", "MyJsFunction(); return false;")

-- krishnanswamy --


Hi,
For me this line..
Ajaxajax.WebForm1.GetServerTime(_doTimeCallback); (Ajaxajax is replaced by the default program name)

returns error.saying object undefined...

Help me..

thanks Krishnan

-- JosephGuadagno --


The was a typo. It should be

function _doTimeCallback(res)
{
alert(res.value);
}

Note, ALERT and ALLERT.

Joseph Guadagno
http://josephguadagno.net 


-- Ravindra --


thank u

-- blossom --


hello sir,

I am also facing the same problem so please send me the solution

Thankx
krishnan.swamy wrote:
Hi,
For me this line..
Ajaxajax.WebForm1.GetServerTime(_doTimeCallback); (Ajaxajax is replaced
by the default program name)

returns error.saying object undefined...

Help me..

thanks
Krishnan

 

-- blossom --


hello sir,

I am also facing the same problem so please send me the solution

Thankx
krishnan.swamy wrote:
Hi,
For me this line..
Ajaxajax.WebForm1.GetServerTime(_doTimeCallback); (Ajaxajax is replaced
by the default program name)

returns error.saying object undefined...

Help me..

thanks
Krishnan

 

-- JosephGuadagno --

You can go to
http://josephguadagno.net/Documents/Using_Ajax_Professional.htm 
there is a GetServerTime Example.

Joseph Guadagno
http://josephguadagno.net 

On 7/12/06, blossom <blossomdsouza> wrote:


hello sir,

I am also facing the same problem so please send me the solution

Thankx
krishnan.swamy wrote:
> Hi,
> For me this line..
> Ajaxajax.WebForm1.GetServerTime(_doTimeCallback); (Ajaxajax is replaced
> by the default program name)
>
> returns error.saying object undefined...
>
> Help me..
>
> thanks
> Krishnan
>

--  

Joseph Guadagno
http://josephguadagno.net 


[Submit Comment]Home