Hi Treasa,
Please try the following code below,
Server side,
using System.Web.UI;
namespace CSSamples.Samples.Features
{
public partial class AreaOfAFeature : System.Web.UI.Page,ICallbackEventHandler
{
string returnvalue = "";
public string GetCallbackResult()
{ return returnvalue; }
public void RaiseCallbackEvent(string eventArgument)
{returnvalue = "ServerSideAlter";}
}
}
Client side,
(script type="text/javascript")
var Map;
function OnMapCreated(map) {
Map = map;
if (map.popups.length > 0) {
OpenLayers.Event.stopObservingElement(map.popups[0].closeDiv, "click", OpenLayers.Function.bindAsEventListener(function () { this.hide(); }, map.popups[0]));
OpenLayers.Event.observe(map.popups[0].closeDiv, "click", OpenLayers.Function.bindAsEventListener(closeCallBack, map.popups[0]));
}
}
function closeCallBack() {
Map.popups[0].hide();
var param="closeBoxClosed";
<%= ClientScript.GetCallbackEventReference(this, "param", "receiveServerData", null)%>;
}
function receiveServerData(columnValue){
alert(columnValue);
}
(/script)
The (script) means the <script>
Regards,
Edgar