469,578 Members | 1,913 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,578 developers. It's quick & easy.

URGENT - ASP.NET, AJAX and server side events

Hi,

I'm wondering if I can do this with ASP.NET?

I have an ASP.NET application that runs a component that fires some
events.

When these events are fired, I will like to trap them at client level
(that is the web browser session where the user is running the actual
application).

Let's say this scenario will be like this:

Person clicks on ASPX page button.

(I'm using AJAX) so this triggers the CLICK event of the button on the
server side, and this executes come code .

This code will fire some events at the server level ...

I want the client (user in its web browser) to "see" this events as they
are fired and react properly, let's say update a LABEL control as this
events are triggered and catched.

Please help me out here, you savvy people, because I'm stuck!

Later and thanks,

Mike


Sep 9 '07 #1
3 1796
Mike wrote:
Hi,

I’m wondering if I can do this with ASP.NET?

I have an ASP.NET application that runs a component that fires some events.

When these events are fired, I will like to trap them at client level
(that is the web browser session where the user is running the actual
application).

Let’s say this scenario will be like this:

Person clicks on ASPX page button…

(I’m using AJAX) so this triggers the CLICK event of the button on the
server side, and this executes come code …

This code will fire some events at the server level …..

I want the client (user in its web browser) to “see” this events as they
are fired and react properly, let’s say update a LABEL control as this
events are triggered and catched.

Please help me out here, you savvy people, because I’m stuck!

Later and thanks,

Mike
I already replied to this question in the m.p.d.languages.vb group:

If you want to update something on the page, just put it in an update panel.

If you want to do something more complicated that needs client script to
run, you can send data to the client and register an event handler for
the EndRequest event to recieve it:

Sys.WebForms.PageRequestManager.getInstance().add_ endRequest(EndRequest);

function EndRequest(sender, args) {
// handle the data here
}

The args argument is an object that has a dataItems property that
contains data items that you send from the server. Use the
RegisterDataItem method of the ScriptManager class to send data items
from the server.

--
Göran Andersson
_____
http://www.guffa.com
Sep 9 '07 #2
Can you please send me a more detailed example?
Do I have to use Javascript or can I do it with VB functions (manage
code)?

Thanks

-----Original Message-----
From: Göran Andersson [mailto:gu***@guffa.com]
Posted At: Sunday, September 09, 2007 3:56 AM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: URGENT - ASP.NET, AJAX and server side events
Subject: Re: URGENT - ASP.NET, AJAX and server side events

Mike wrote:
Hi,

I’m wondering if I can do this with ASP.NET?

I have an ASP.NET application that runs a component that fires some
events.
>
When these events are fired, I will like to trap them at client level
(that is the web browser session where the user is running the actual
application).

Let’s say this scenario will be like this:

Person clicks on ASPX page button…

(I’m using AJAX) so this triggers the CLICK event of the button on the
server side, and this executes come code …

This code will fire some events at the server level …..

I want the client (user in its web browser) to “see” this events as
they
are fired and react properly, let’s say update a LABEL control as this
events are triggered and catched.

Please help me out here, you savvy people, because I’m stuck!

Later and thanks,

Mike
I already replied to this question in the m.p.d.languages.vb group:

If you want to update something on the page, just put it in an update
panel.

If you want to do something more complicated that needs client script to

run, you can send data to the client and register an event handler for
the EndRequest event to recieve it:

Sys.WebForms.PageRequestManager.getInstance().add_ endRequest(EndRequest)
;

function EndRequest(sender, args) {
// handle the data here
}

The args argument is an object that has a dataItems property that
contains data items that you send from the server. Use the
RegisterDataItem method of the ScriptManager class to send data items
from the server.

--
Göran Andersson
_____
http://www.guffa.com

Sep 9 '07 #3
Mike wrote:
Can you please send me a more detailed example?
A more detailed example of what? I don't know enough about what you are
trying to do to be more detailed.
Do I have to use Javascript or can I do it with VB functions (manage
code)?
That depends on what you are trying to do. If you want to run some code
in the client, that would be Javascript.

--
Göran Andersson
_____
http://www.guffa.com
Sep 9 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by | last post: by
31 posts views Thread by Tony | last post: by
1 post views Thread by John Chan | last post: by
4 posts views Thread by =?Utf-8?B?SmVycnkgQw==?= | last post: by
6 posts views Thread by HockeyFan | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.