Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    file aspx e file aspx.vb

    Lavorando con Visual Studio.NET sto avendo parecchi problemi.

    Stamattina ad esempio mi sono spariti tutti gli OleDbDataAdapter, dataset, OleDbConnection dalla modalità design e ogni volta che riprovavo a ricrearli mi dava un errore.

    Ho deciso così di dichiararli nel file aspx.vb onde evitare nuovi casini.

    Protected WithEvents conn As New System.Data.OleDb.OleDbConnection("Provider=Micros oft.Jet.OLEDB.4.0;User ID=Admin;Data Source=" & Server.MapPath("..\codogno\mdb-database\codogno.mdb;") & "")
    Public select1 As New String("SELECT * FROM tblAttivita")
    Public select2 As New String("SELECT DISTINCT categoria FROM tblAttivita")
    Protected WithEvents DataGrid1 As System.Web.UI.WebControls.DataGrid
    Protected WithEvents oleDbDataAdapter1 As New System.Data.OleDb.OleDbDataAdapter(select1, conn)
    Protected WithEvents oleDbDataAdapter2 As New System.Data.OleDb.OleDbDataAdapter(select2, conn)
    Protected WithEvents dataset11 As New DataSet1()
    Protected WithEvents dataset21 As New DataSet2()
    Protected WithEvents OleDbSelectCommand1 As System.Data.OleDb.OleDbCommand
    Protected WithEvents OleDbInsertCommand1 As System.Data.OleDb.OleDbCommand
    Protected WithEvents OleDbUpdateCommand1 As System.Data.OleDb.OleDbCommand
    Protected WithEvents OleDbDeleteCommand1 As System.Data.OleDb.OleDbCommand
    Protected WithEvents OleDbSelectCommand2 As System.Data.OleDb.OleDbCommand




    Ora però ho notato che se nel file .aspx creo una nuova label, nel file aspx.vb questa label non viene vista

    Non esiste un modo per ricompilare il progetto con i nuovi elementi aggiunti?

  2. #2
    A volte capita anche a me, soppratutto su pagine molto grosse, aggiungo elementi nella pagina aspx ma non mi vengono dichiarati nel codice (idem con gli eventi). L'unica "soluzione" che ho trovato e di dichiararsi manualmente gli elementi protetti nel codice...

  3. #3

    quindi......

    ho provato anche dichiarando nel file aspx.vb:
    Protected WithEvents MIADROPDOWNLIST As System.Web.UI.WebControls.DropDownList

    ma nulla..

    conosci un altro modo?

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.