se usi VS.NET non dovresti avere molti problemi perchè in automatico ti crea il file .vb
cmq per farla breve devi utilizzare del codice behind
se tu crei un file pagina.aspx, creati anche il file pagina.aspx.vb
in pagina.aspx metti come solo ed unico codice .net questo:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="pagina.aspx.vb" Inherits="nome_progettto.nomepagina" %>
nel file pagina.aspx.vb avrai questo:
praticamentecodice:Imports System.Data Imports System.Data.OleDb Public Class pagina Inherits System.Web.UI.Page 'dichiarazioni dei vari oggetti che utilizzerai nel codice HTML 'es. label, datalist, repeater, textbox..... Protected WithEvents MyDataList As System.Web.UI.WebControls.DataList 'non modificare #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region ' fine parte da non modificare 'dichiari le variabili globali che puoi utilizzare all'interno della classe Dim Var_GLOBALE as ..... Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub ' le tue funzioni o le tue sub Public Function Nome_Funzione(....) End Function Private Sub Nome_Sub(....) End Sub End Class

Rispondi quotando