24 messaggi dal 18 ottobre 2008
Apportando modifiche al codice di un mio sito elaborato in Visual Studio Express 2013 vengono generati errori di debug in una delle pagine aspx.vb che non riesco a comprendere perché la pagina è esattamente speculare nella struttura e nelle routine (salvo ovviamente i nomi degli oggetti e delle variabili) ad altre che non mi danno errori.
La pagina AttTeatro.aspx.vb mi dà i seguenti numerosi errori:
"Button... non è un membro di AttTeatro_AttTeatro"
"La clausola Handles richiede una variabile WithEvents definita nel tipo che la contiene o in uno dei suoi tipi di base"
Codice della pagina:
Partial Class AttTeatro_AttTeatro
Inherits System.Web.UI.Page

Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
If Not IsPostBack Then
ChiudeDettagli()
End If
End Sub

Sub ReimpostaInizio()
ChiudeVideo()
ChiudeDettagli()
ApreTitoli()
End Sub

Sub ChiudeVideo()
If Me.PanelVideoPassiTempo.Visible Then Me.PanelVideoPassiTempo.Visible = False
If Me.ButtonChiudeVideoPassiTempo.Visible Then Me.ButtonChiudeVideoPassiTempo.Visible = False
If Me.ButtonApreVideoPassiTempo.Visible = False Then Me.ButtonApreVideoPassiTempo.Visible = True
If Me.PanelVideoDemocrazia.Visible Then Me.PanelVideoDemocrazia.Visible = False
If Me.ButtonChiudeVideoDemocrazia.Visible Then Me.ButtonChiudeVideoDemocrazia.Visible = False
If Me.ButtonApreVideoDemocrazia.Visible = False Then Me.ButtonApreVideoDemocrazia.Visible = True
If Me.PanelVideoInverno.Visible Then Me.PanelVideoInverno.Visible = False
If Me.ButtonChiudeVideoInverno.Visible Then Me.ButtonChiudeVideoInverno.Visible = False
If Me.ButtonApreVideoInverno.Visible = False Then Me.ButtonApreVideoInverno.Visible = True
If Me.PanelVideoVoci.Visible Then Me.PanelVideoVoci.Visible = False
If Me.ButtonChiudeVideoVoci.Visible Then Me.ButtonChiudeVideoVoci.Visible = False
If Me.ButtonApreVideoVoci.Visible = False Then Me.ButtonApreVideoVoci.Visible = True
If Me.PanelVideoVeliero.Visible Then Me.PanelVideoVeliero.Visible = False
If Me.ButtonChiudeVideoVeliero.Visible Then Me.ButtonChiudeVideoVeliero.Visible = False
If Me.ButtonApreVideoVeliero.Visible = False Then Me.ButtonApreVideoVeliero.Visible = True
If Me.PanelVideoCaseGialle.Visible Then Me.PanelVideoCaseGialle.Visible = False
If Me.ButtonChiudeVideoCaseGialle.Visible Then Me.ButtonChiudeVideoCaseGialle.Visible = False
If Me.ButtonApreVideoCaseGialle.Visible = False Then Me.ButtonApreVideoCaseGialle.Visible = True
If Me.PanelVideoPinocchio.Visible Then Me.PanelVideoPinocchio.Visible = False
If Me.ButtonChiudeVideoPinocchio.Visible Then Me.ButtonChiudeVideoPinocchio.Visible = False
If Me.ButtonApreVideoPinocchio.Visible = False Then Me.ButtonApreVideoPinocchio.Visible = True
If Me.PanelVideoAranci.Visible Then Me.PanelVideoAranci.Visible = False
If Me.ButtonChiudeVideoAranci.Visible Then Me.ButtonChiudeVideoAranci.Visible = False
If Me.ButtonApreVideoAranci.Visible = False Then Me.ButtonApreVideoAranci.Visible = True
If Me.PanelVideoCondominio.Visible Then Me.PanelVideoCondominio.Visible = False
If Me.ButtonChiudeVideoCondominio.Visible Then Me.ButtonChiudeVideoCondominio.Visible = False
If Me.ButtonApreVideoCondominio.Visible = False Then Me.ButtonApreVideoCondominio.Visible = True
If Me.PanelVideoSottosuolo.Visible Then Me.PanelVideoSottosuolo.Visible = False
If Me.ButtonChiudeVideoSottosuolo.Visible Then Me.ButtonChiudeVideoSottosuolo.Visible = False
If Me.ButtonApreVideoSottosuolo.Visible = False Then Me.ButtonApreVideoSottosuolo.Visible = True
If Me.PanelVideoMaterassi.Visible Then Me.PanelVideoMaterassi.Visible = False
If Me.ButtonChiudeVideoMaterassi.Visible Then Me.ButtonChiudeVideoMaterassi.Visible = False
If Me.ButtonApreVideoMaterassi.Visible = False Then Me.ButtonApreVideoMaterassi.Visible = True
If Me.PanelVideoFantasma.Visible Then Me.PanelVideoFantasma.Visible = False
If Me.ButtonChiudeVideoFantasma.Visible Then Me.ButtonChiudeVideoFantasma.Visible = False
If Me.ButtonApreVideoFantasma.Visible = False Then Me.ButtonApreVideoFantasma.Visible = True
End Sub

Sub ChiudeDettagli()
Me.PanelDomandaMatrimonio.Visible = False
Me.PanelPrevert.Visible = False
Me.PanelFioreInBocca.Visible = False
Me.PanelSpoonRiver.Visible = False
Me.PanelPoesieBrecht.Visible = False
Me.PanelFantasma.Visible = False
Me.PanelSottosuolo.Visible = False
Me.PanelMaterassi.Visible = False
Me.PanelCondominio.Visible = False
Me.PanelAranci.Visible = False
Me.PanelPinocchio.Visible = False
Me.PanelCaseGialle.Visible = False
Me.PanelVeliero.Visible = False
Me.PanelInverno.Visible = False
Me.PanelVoci.Visible = False
Me.PanelDemocrazia.Visible = False
Me.PanelPassiTempo.Visible = False
End Sub

Sub ChiudeTitoli()
Me.TitoloDomandaMatrimonio.Visible = False
Me.ButtonApreDomandaMatrimonio.Visible = False
Me.TitoloPrevert.Visible = False
Me.ButtonAprePrevert.Visible = False
Me.TitoloFioreInBocca.Visible = False
Me.ButtonApreFioreInBocca.Visible = False
Me.TitoloSpoonRiver.Visible = False
Me.ButtonApreSpoonRiver.Visible = False
Me.TitoloPoesieBrecht.Visible = False
Me.ButtonAprePoesieBrecht.Visible = False
Me.TitoloFantasma.Visible = False
Me.ButtonApreFantasma.Visible = False
Me.TitoloSottosuolo.Visible = False
Me.ButtonApreSottosuolo.Visible = False
Me.TitoloMaterassi.Visible = False
Me.ButtonApreMaterassi.Visible = False
Me.TitoloCondominio.Visible = False
Me.ButtonApreCondominio.Visible = False
Me.TitoloAranci.Visible = False
Me.ButtonApreAranci.Visible = False
Me.TitoloPinocchio.Visible = False
Me.ButtonAprePinocchio.Visible = False
Me.TitoloCaseGialle.Visible = False
Me.ButtonApreCaseGialle.Visible = False
Me.TitoloVeliero.Visible = False
Me.ButtonApreVeliero.Visible = False
Me.TitoloInverno.Visible = False
Me.ButtonApreInverno.Visible = False
Me.TitoloVoci.Visible = False
Me.ButtonApreVoci.Visible = False
Me.TitoloDemocrazia.Visible = False
Me.ButtonApreDemocrazia.Visible = False
Me.TitoloPassiTempo.Visible = False
Me.ButtonAprePassiTempo.Visible = False
End Sub

Sub ApreTitoli()
Me.TitoloDomandaMatrimonio.Visible = True
Me.ButtonApreDomandaMatrimonio.Visible = True
Me.TitoloPrevert.Visible = True
Me.ButtonAprePrevert.Visible = True
Me.TitoloFioreInBocca.Visible = True
Me.ButtonApreFioreInBocca.Visible = True
Me.TitoloSpoonRiver.Visible = True
Me.ButtonApreSpoonRiver.Visible = True
Me.TitoloPoesieBrecht.Visible = True
Me.ButtonAprePoesieBrecht.Visible = True
Me.TitoloFantasma.Visible = True
Me.ButtonApreFantasma.Visible = True
Me.TitoloSottosuolo.Visible = True
Me.ButtonApreSottosuolo.Visible = True
Me.TitoloMaterassi.Visible = True
Me.ButtonApreMaterassi.Visible = True
Me.TitoloCondominio.Visible = True
Me.ButtonApreCondominio.Visible = True
Me.TitoloAranci.Visible = True
Me.ButtonApreAranci.Visible = True
Me.TitoloPinocchio.Visible = True
Me.ButtonAprePinocchio.Visible = True
Me.TitoloCaseGialle.Visible = True
Me.ButtonApreCaseGialle.Visible = True
Me.TitoloVeliero.Visible = True
Me.ButtonApreVeliero.Visible = True
Me.TitoloInverno.Visible = True
Me.ButtonApreInverno.Visible = True
Me.TitoloVoci.Visible = True
Me.ButtonApreVoci.Visible = True
Me.TitoloDemocrazia.Visible = True
Me.ButtonApreDemocrazia.Visible = True
Me.TitoloPassiTempo.Visible = True
Me.ButtonAprePassiTempo.Visible = True
End Sub

Protected Sub ButtonApreDomandaMatrimonio_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreDomandaMatrimonio.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloDomandaMatrimonio.Visible = True
Me.PanelDomandaMatrimonio.Visible = True
End Sub

Protected Sub ButtonChiudeDomandaMatrimonio_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeDomandaMatrimonio.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonAprePrevert_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonAprePrevert.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloPrevert.Visible = True
Me.PanelPrevert.Visible = True
End Sub

Protected Sub ButtonChiudePrevert_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudePrevert.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreFioreInBocca_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreFioreInBocca.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloFioreInBocca.Visible = True
Me.PanelFioreInBocca.Visible = True
End Sub

Protected Sub ButtonChiudeFioreInBocca_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeFioreInBocca.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreSpoonRiver_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreSpoonRiver.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloSpoonRiver.Visible = True
Me.PanelSpoonRiver.Visible = True
End Sub

Protected Sub ButtonChiudeSpoonRiver_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeSpoonRiver.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonAprePoesieBrecht_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonAprePoesieBrecht.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloPoesieBrecht.Visible = True
Me.PanelPoesieBrecht.Visible = True
End Sub

Protected Sub ButtonChiudePoesieBrecht_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudePoesieBrecht.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreVideoFantasma_Clik(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoFantasma.Click
ChiudeVideo()
Me.ButtonApreVideoFantasma.Visible = False
Me.ButtonChiudeVideoFantasma.Visible = True
Me.PanelVideoFantasma.Visible = True
End Sub

Protected Sub ButtonChiudeVideoFantasma_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoFantasma.Click
Me.PanelVideoFantasma.Visible = False
Me.ButtonChiudeVideoFantasma.Visible = False
Me.ButtonApreVideoFantasma.Visible = True
End Sub

Protected Sub ButtonApreFantasma_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreFantasma.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloFantasma.Visible = True
Me.PanelFantasma.Visible = True
End Sub

Protected Sub ButtonChiudeFantasma_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeFantasma.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreVideoMaterassi_Clik(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoMaterassi.Click
ChiudeVideo()
Me.ButtonApreVideoMaterassi.Visible = False
Me.ButtonChiudeVideoMaterassi.Visible = True
Me.PanelVideoMaterassi.Visible = True
End Sub

Protected Sub ButtonChiudeVideoMaterassi_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoMaterassi.Click
Me.PanelVideoMaterassi.Visible = False
Me.ButtonChiudeVideoMaterassi.Visible = False
Me.ButtonApreVideoMaterassi.Visible = True
End Sub

Protected Sub ButtonApreMaterassi_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreMaterassi.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloMaterassi.Visible = True
Me.PanelMaterassi.Visible = True
End Sub

Protected Sub ButtonChiudeMaterassi_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeMaterassi.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreVideoSottosuolo_Clik(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoSottosuolo.Click
ChiudeVideo()
Me.ButtonApreVideoSottosuolo.Visible = False
Me.ButtonChiudeVideoSottosuolo.Visible = True
Me.PanelVideoSottosuolo.Visible = True
End Sub

Protected Sub ButtonChiudeVideoSottosuolo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoSottosuolo.Click
Me.PanelVideoSottosuolo.Visible = False
Me.ButtonChiudeVideoSottosuolo.Visible = False
Me.ButtonApreVideoSottosuolo.Visible = True
End Sub

Protected Sub ButtonApreSottosuolo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreSottosuolo.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloSottosuolo.Visible = True
Me.PanelSottosuolo.Visible = True
End Sub

Protected Sub ButtonChiudeSottosuolo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeSottosuolo.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreVideoCondominio_Clik(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoCondominio.Click
ChiudeVideo()
Me.ButtonApreVideoCondominio.Visible = False
Me.ButtonChiudeVideoCondominio.Visible = True
Me.PanelVideoCondominio.Visible = True
End Sub

Protected Sub ButtonChiudeVideoCondominio_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoCondominio.Click
Me.PanelVideoCondominio.Visible = False
Me.ButtonChiudeVideoCondominio.Visible = False
Me.ButtonApreVideoCondominio.Visible = True
End Sub

Protected Sub ButtonApreCondominio_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreCondominio.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloCondominio.Visible = True
Me.PanelCondominio.Visible = True
End Sub

Protected Sub ButtonChiudeCondominio_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeCondominio.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreVideoAranci_Clik(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoAranci.Click
ChiudeVideo()
Me.ButtonApreVideoAranci.Visible = False
Me.ButtonChiudeVideoAranci.Visible = True
Me.PanelVideoAranci.Visible = True
End Sub

Protected Sub ButtonChiudeVideoAranci_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoAranci.Click
Me.PanelVideoAranci.Visible = False
Me.ButtonChiudeVideoAranci.Visible = False
Me.ButtonApreVideoAranci.Visible = True
End Sub

Protected Sub ButtonApreAranci_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreAranci.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloAranci.Visible = True
Me.PanelAranci.Visible = True
End Sub

Protected Sub ButtonChiudeAranci_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeAranci.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreVideoPinocchio_Clik(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoPinocchio.Click
ChiudeVideo()
Me.ButtonApreVideoPinocchio.Visible = False
Me.ButtonChiudeVideoPinocchio.Visible = True
Me.PanelVideoPinocchio.Visible = True
End Sub

Protected Sub ButtonChiudeVideoPinocchio_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoPinocchio.Click
Me.PanelVideoPinocchio.Visible = False
Me.ButtonChiudeVideoPinocchio.Visible = False
Me.ButtonApreVideoPinocchio.Visible = True
End Sub

Protected Sub ButtonAprePinocchio_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonAprePinocchio.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloPinocchio.Visible = True
Me.PanelPinocchio.Visible = True
End Sub

Protected Sub ButtonChiudePinocchio_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudePinocchio.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreVideoCaseGialle_Clik(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoCaseGialle.Click
ChiudeVideo()
Me.ButtonApreVideoCaseGialle.Visible = False
Me.ButtonChiudeVideoCaseGialle.Visible = True
Me.PanelVideoCaseGialle.Visible = True
End Sub

Protected Sub ButtonChiudeVideoCaseGialle_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoCaseGialle.Click
Me.PanelVideoCaseGialle.Visible = False
Me.ButtonChiudeVideoCaseGialle.Visible = False
Me.ButtonApreVideoCaseGialle.Visible = True
End Sub

Protected Sub ButtonApreCaseGialle_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreCaseGialle.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloCaseGialle.Visible = True
Me.PanelCaseGialle.Visible = True
End Sub

Protected Sub ButtonChiudeCaseGialle_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeCaseGialle.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreVideoVeliero_Clik(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoVeliero.Click
ChiudeVideo()
Me.ButtonApreVideoVeliero.Visible = False
Me.ButtonChiudeVideoVeliero.Visible = True
Me.PanelVideoVeliero.Visible = True
End Sub

Protected Sub ButtonChiudeVideoVeliero_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoVeliero.Click
Me.PanelVideoVeliero.Visible = False
Me.ButtonChiudeVideoVeliero.Visible = False
Me.ButtonApreVideoVeliero.Visible = True
End Sub

Protected Sub ButtonApreVeliero_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVeliero.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloVeliero.Visible = True
Me.PanelVeliero.Visible = True
End Sub

Protected Sub ButtonChiudeVeliero_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVeliero.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreVideoInverno_Clik(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoInverno.Click
ChiudeVideo()
Me.ButtonApreVideoInverno.Visible = False
Me.ButtonChiudeVideoInverno.Visible = True
Me.PanelVideoInverno.Visible = True
End Sub

Protected Sub ButtonChiudeVideoInverno_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoInverno.Click
Me.PanelVideoInverno.Visible = False
Me.ButtonChiudeVideoInverno.Visible = False
Me.ButtonApreVideoInverno.Visible = True
End Sub

Protected Sub ButtonApreInverno_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreInverno.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloInverno.Visible = True
Me.PanelInverno.Visible = True
End Sub

Protected Sub ButtonChiudeInverno_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeInverno.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreVideoVoci_Clik(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoVoci.Click
ChiudeVideo()
Me.ButtonApreVideoVoci.Visible = False
Me.ButtonChiudeVideoVoci.Visible = True
Me.PanelVideoVoci.Visible = True
End Sub

Protected Sub ButtonChiudeVideoVoci_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoVoci.Click
Me.PanelVideoVoci.Visible = False
Me.ButtonChiudeVideoVoci.Visible = False
Me.ButtonApreVideoVoci.Visible = True
End Sub

Protected Sub ButtonApreVoci_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVoci.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloVoci.Visible = True
Me.PanelVoci.Visible = True
End Sub

Protected Sub ButtonChiudeVoci_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVoci.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreVideoDemocrazia_Clik(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoDemocrazia.Click
ChiudeVideo()
Me.ButtonApreVideoDemocrazia.Visible = False
Me.ButtonChiudeVideoDemocrazia.Visible = True
Me.PanelVideoDemocrazia.Visible = True
End Sub

Protected Sub ButtonChiudeVideoDemocrazia_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoDemocrazia.Click
Me.PanelVideoDemocrazia.Visible = False
Me.ButtonChiudeVideoDemocrazia.Visible = False
Me.ButtonApreVideoDemocrazia.Visible = True
End Sub

Protected Sub ButtonApreDemocrazia_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreDemocrazia.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloDemocrazia.Visible = True
Me.PanelDemocrazia.Visible = True
End Sub

Protected Sub ButtonChiudeDemocrazia_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeDemocrazia.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreVideoPassiTempo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoPassiTempo.Click
ChiudeVideo()
Me.ButtonApreVideoPassiTempo.Visible = False
Me.ButtonChiudeVideoPassiTempo.Visible = True
Me.PanelVideoPassiTempo.Visible = True
End Sub

Protected Sub ButtonChiudeVideoPassiTempo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoPassiTempo.Click
Me.PanelVideoPassiTempo.Visible = False
Me.ButtonChiudeVideoPassiTempo.Visible = False
Me.ButtonApreVideoPassiTempo.Visible = True
End Sub

Protected Sub ButtonAprePassiTempo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonAprePassiTempo.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloPassiTempo.Visible = True
Me.PanelPassiTempo.Visible = True
End Sub

Protected Sub ButtonChiudePassiTempo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudePassiTempo.Click
ReimpostaInizio()
End Sub

End Class


Invece ad esempio la pagina AttCinem_AttCinema non mi da errori. Codice della pagina:

Partial Class AttCinema_AttCinema
Inherits System.Web.UI.Page

Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
If Not IsPostBack Then
ChiudeDettagli()
End If
End Sub

Sub ReimpostaInizio()
ChiudeVideo()
ChiudeDettagli()
ApreTitoli()
End Sub

Sub ChiudeVideo()
If Me.PanelVideoVolo.Visible Then Me.PanelVideoVolo.Visible = False
If Me.ButtonChiudeVideoVolo.Visible Then Me.ButtonChiudeVideoVolo.Visible = False
If Me.ButtonApreVideoVolo.Visible = False Then Me.ButtonApreVideoVolo.Visible = True
If Me.PanelVideoPeccato.Visible Then Me.PanelVideoPeccato.Visible = False
If Me.ButtonChiudeVideoPeccato.Visible Then Me.ButtonChiudeVideoPeccato.Visible = False
If Me.ButtonApreVideoPeccato.Visible = False Then Me.ButtonApreVideoPeccato.Visible = True
If Me.PanelVideoSottosuolo.Visible Then Me.PanelVideoSottosuolo.Visible = False
If Me.ButtonChiudeVideoSottosuolo.Visible Then Me.ButtonChiudeVideoSottosuolo.Visible = False
If Me.ButtonApreVideoSottosuolo.Visible = False Then Me.ButtonApreVideoSottosuolo.Visible = True
If Me.PanelVideoSera.Visible Then Me.PanelVideoSera.Visible = False
If Me.ButtonChiudeVideoSera.Visible Then Me.ButtonChiudeVideoSera.Visible = False
If Me.ButtonApreVideoSera.Visible = False Then Me.ButtonApreVideoSera.Visible = True
If Me.PanelVideoAddio.Visible Then Me.PanelVideoAddio.Visible = False
If Me.ButtonChiudeVideoAddio.Visible Then Me.ButtonChiudeVideoAddio.Visible = False
If Me.ButtonApreVideoAddio.Visible = False Then Me.ButtonApreVideoAddio.Visible = True
End Sub

Sub ChiudeDettagli()
Me.PanelVolo.Visible = False
Me.PanelPeccato.Visible = False
Me.PanelSottosuolo.Visible = False
Me.PanelBlue.Visible = False
Me.PanelSera.Visible = False
Me.PanelYeats.Visible = False
Me.PanelAddio.Visible = False
End Sub

Sub ChiudeTitoli()
Me.TitoloVolo.Visible = False
Me.ButtonApreVolo.Visible = False
Me.TitoloPeccato.Visible = False
Me.ButtonAprePeccato.Visible = False
Me.TitoloSottosuolo.Visible = False
Me.ButtonApreSottosuolo.Visible = False
Me.TitoloBlue.Visible = False
Me.ButtonApreBlue.Visible = False
Me.TitoloSera.Visible = False
Me.ButtonApreSera.Visible = False
Me.TitoloYeats.Visible = False
Me.ButtonApreYeats.Visible = False
Me.TitoloAddio.Visible = False
Me.ButtonApreAddio.Visible = False
End Sub

Sub ApreTitoli()
Me.TitoloVolo.Visible = True
Me.ButtonApreVolo.Visible = True
Me.TitoloPeccato.Visible = True
Me.ButtonAprePeccato.Visible = True
Me.TitoloSottosuolo.Visible = True
Me.ButtonApreSottosuolo.Visible = True
Me.TitoloBlue.Visible = True
Me.ButtonApreBlue.Visible = True
Me.TitoloSera.Visible = True
Me.ButtonApreSera.Visible = True
Me.TitoloYeats.Visible = True
Me.ButtonApreYeats.Visible = True
Me.TitoloAddio.Visible = True
Me.ButtonApreAddio.Visible = True
End Sub

Protected Sub ButtonApreVideoAddio_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoAddio.Click
ChiudeVideo()
Me.ButtonApreVideoAddio.Visible = False
Me.ButtonChiudeVideoAddio.Visible = True
Me.PanelVideoAddio.Visible = True
End Sub

Protected Sub ButtonChiudeVideoAddio_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoAddio.Click
Me.PanelVideoAddio.Visible = False
Me.ButtonChiudeVideoAddio.Visible = False
Me.ButtonApreVideoAddio.Visible = True
End Sub

Protected Sub ButtonApreAddio_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreAddio.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloAddio.Visible = True
Me.PanelAddio.Visible = True
End Sub

Protected Sub ButtonChiudeAddio_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeAddio.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreYeats_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreYeats.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloYeats.Visible = True
Me.PanelYeats.Visible = True
End Sub

Protected Sub ButtonChiudeYeats_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeYeats.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreVideoSera_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoSera.Click
ChiudeVideo()
Me.ButtonApreVideoSera.Visible = False
Me.ButtonChiudeVideoSera.Visible = True
Me.PanelVideoSera.Visible = True
End Sub

Protected Sub ButtonChiudeVideoSera_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoSera.Click
Me.PanelVideoSera.Visible = False
Me.ButtonChiudeVideoSera.Visible = False
Me.ButtonApreVideoSera.Visible = True
End Sub

Protected Sub ButtonApreSera_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreSera.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloSera.Visible = True
Me.PanelSera.Visible = True
End Sub

Protected Sub ButtonChiudeSera_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeSera.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreBlue_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreBlue.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloBlue.Visible = True
Me.PanelBlue.Visible = True
End Sub

Protected Sub ButtonChiudeBlue_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeBlue.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreVideoSottosuolo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoSottosuolo.Click
ChiudeVideo()
Me.ButtonApreVideoSottosuolo.Visible = False
Me.ButtonChiudeVideoSottosuolo.Visible = True
Me.PanelVideoSottosuolo.Visible = True
End Sub

Protected Sub ButtonChiudeVideoSottosuolo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoSottosuolo.Click
Me.PanelVideoSottosuolo.Visible = False
Me.ButtonChiudeVideoSottosuolo.Visible = False
Me.ButtonApreVideoSottosuolo.Visible = True
End Sub

Protected Sub ButtonApreSottosuolo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreSottosuolo.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloSottosuolo.Visible = True
Me.PanelSottosuolo.Visible = True
End Sub

Protected Sub ButtonChiudeSottosuolo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeSottosuolo.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreVideoPeccato_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoPeccato.Click
ChiudeVideo()
Me.ButtonApreVideoPeccato.Visible = False
Me.ButtonChiudeVideoPeccato.Visible = True
Me.PanelVideoPeccato.Visible = True
End Sub

Protected Sub ButtonChiudeVideoPeccato_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoPeccato.Click
Me.PanelVideoPeccato.Visible = False
Me.ButtonChiudeVideoPeccato.Visible = False
Me.ButtonApreVideoPeccato.Visible = True
End Sub

Protected Sub ButtonAprePeccato_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonAprePeccato.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloPeccato.Visible = True
Me.PanelPeccato.Visible = True
End Sub

Protected Sub ButtonChiudePeccato_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudePeccato.Click
ReimpostaInizio()
End Sub

Protected Sub ButtonApreVideoVolo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVideoVolo.Click
ChiudeVideo()
Me.ButtonApreVideoVolo.Visible = False
Me.ButtonChiudeVideoVolo.Visible = True
Me.PanelVideoVolo.Visible = True
End Sub

Protected Sub ButtonChiudeVideoVolo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVideoVolo.Click
Me.PanelVideoVolo.Visible = False
Me.ButtonChiudeVideoVolo.Visible = False
Me.ButtonApreVideoVolo.Visible = True
End Sub

Protected Sub ButtonApreVolo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonApreVolo.Click
ChiudeTitoli()
ChiudeDettagli()
Me.TitoloVolo.Visible = True
Me.PanelVolo.Visible = True
End Sub

Protected Sub ButtonChiudeVolo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonChiudeVolo.Click
ReimpostaInizio()
End Sub

End Class

Da che può dipendere (ovviamente i nomi degli oggetti corrispondono esattamente a quelli della pagina .aspx)?
Aggiungo che sia in locale mediante IIS che su internet dopo la pubblicazione il sito funziona correttamente.
Grazie
Modificato da UlyDec il 27 agosto 2018 18.39 -
11.645 messaggi dal 09 febbraio 2002
Contributi
Ciao,


la pagina è esattamente speculare nella struttura e nelle routine (salvo ovviamente i nomi degli oggetti e delle variabili)

Ok, però almeno una differenza deve esserci, bisogna cercare bene. Confronta un paio di cose:
  • Le direttive @Page che si trovano in cima ai file aspx. Verifica che abbiano gli stessi identici attributi (es. l'attriuto CodeFile non è la stessa cosa dell'attributo CodeBehind - presta attenzione a queste eventuali piccole differenze);
  • Il file designer sia correttamente caricato. Dal pannello Solution Explorer di Visual Studio, trova i due file aspx ed espandili. Verifica che al di sotto ci siano il file .aspx.vb e il file .aspx.designer.vb.
    N.B.: se non dovessi riuscire ad espandere i file aspx, vuol dire che devi cliccare il bottoncino "Mostra tutti i file" della toolbar del Solution Explorer. Eccolo evidenziato in questa immagine.


ciao,
Moreno

Enjoy learning and just keep making

Torna al forum | Feed RSS

ASPItalia.com non è responsabile per il contenuto dei messaggi presenti su questo servizio, non avendo nessun controllo sui messaggi postati nei propri forum, che rappresentano l'espressione del pensiero degli autori.