Anonymous user  |  Log in  |  Create Account
Message inside General Discussions

Serverevent Asynchrone?

Answer 
#1 - 11/6/2009 1:03:30 PM Reporta abuso | PermaLink
Mansur
Fecha de registro: 7/9/2007
14 posts en todos los foros
Serverevent Asynchrone?

Answer Quote
Hello,

What I think is that the ServerEvent is asynchrone:

var ev = new serverEvent('dblclick', {0});
ev.send();        // <-- Asynchrone Call?


If yes. Is there an Event like "onreadystateChanged"?

What I try is to use the Serverevent for some Zoomin-Events (dblclick, zoomend, moveend) on the Server. in the Servercode I tryed to access Objects on the page which failed.

Samplecode:
protected string GoogleMap_ServerEvent(object s, GAjaxServerEventOtherArgs e)
{

Label myLabel = (Label)Page.FindControl("myLabelID");

}

I think this fails because the ServerEvent is not in the regular Page-Livecycle. Am I right?

So Question:

Does anybody has an good Idea on how to access the Page while in the ServerEvent?

Other Question:
I try'ed to add on the GMap1.addListener - JavaScript code somethink like:

document.getElementById('SomeAspButtonClientId').click();

Basically this works, but because the ServerEvent-send() Method is asynchrone it fails because the Serverevent may is not completed .. and so I miss Information in the Button-Click-Event.

Any Suggestions?

Mansur

Top

Answers
De en 15
#2 - 11/10/2009 10:27:39 AM Reporta abuso | PermaLink
subgurim
Fecha de registro: 10/18/2006
2002 posts en todos los foros
RE: Serverevent Asynchrone?

Answer Quote
Hi,
Please, take a look here: GoogleMaps ASP.NET Postback
Top
De en 15

Powered by Subgurim.NET