¡Ayúdanos a traducir esta Web y consigue licencias gratis!
Usuario anónimo  |  Ingresar  |  Regístrate
Mensaje dentro General Discussions

Serverevent Asynchrone?

Responder 
#1 - 06/11/2009 13:03:30 Reporta abuso | Link permanente
Mansur
Fecha de registro: 09/07/2007
14 posts en todos los foros
Serverevent Asynchrone?

Responder Citar
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

Volver arriba

Respuestas
De en 15
#2 - 10/11/2009 10:27:39 Reporta abuso | Link permanente
subgurim
Fecha de registro: 18/10/2006
1972 posts en todos los foros
RE: Serverevent Asynchrone?

Responder Citar
Hi,
Please, take a look here: GoogleMaps ASP.NET Postback
Volver arriba
De en 15

Powered by Subgurim.NET