ciao.
ho un problema sul raiseevent dopo una conversione da C# a VB
ho gia tentato un supporto in ASP.NET senza risultato e quindi provo qui sulla parte Clinet sperando in una soluzione
ho questa funzione in C#
codice:
public partial class GoogleMapForASPNet : System.Web.UI.UserControl
{
public delegate void PushpinMovedHandler(string pID);
public event PushpinMovedHandler PushpinMoved;
// The method which fires the Event
public void OnPushpinMoved(string pID)
{
// Check if there are any Subscribers
if (PushpinMoved != null)
{
// Call the Event
GoogleMapObject = (GoogleObject)System.Web.HttpContext.Current.Session["GOOGLE_MAP_OBJECT"];
PushpinMoved(pID);
}
}
...
...
dopo una conversione on line in VB, mi ritrovo questa funzione:
codice:
Partial Public Class GoogleMapForASPNet
Inherits System.Web.UI.UserControl
Public Delegate Sub PushpinMovedHandler(ByVal pID As String)
Public Event PushpinMoved As PushpinMovedHandler
' The method which fires the Event
Public Sub OnPushpinMoved(ByVal pID As String)
' Check if there are any Subscribers
If PushpinMoved IsNot Nothing Then
' Call the Event
GoogleMapObject = DirectCast(System.Web.HttpContext.Current.Session("GOOGLE_MAP_OBJECT"), GoogleObject)
RaiseEvent PushpinMoved(pID)
End If
End Sub
...
...
il sistema ri restituisce un errore nella riga If PushpinMoved
codice:
Public Event PushpinMoved(pID As String)' è un evento e non può essere chiamato direttamente. Utilizzare un'istruzione 'RaiseEvent' per generare un evento.
da qui nonostante le ricerche in web non so come risolvere
grazie