Ho fatto così:
codice:
<asp:Button ID="Button1" Runat="server" Text="prova" OnClick="m_subcomuni.Login()"></asp:Button>
codice:
Imports System.Data.SqlClient
Public Class manuela
Inherits System.Web.UI.Page
Protected WithEvents txt_userid As System.Web.UI.WebControls.TextBox
Protected WithEvents txt_password As System.Web.UI.WebControls.TextBox
Protected WithEvents btn_log As System.Web.UI.HtmlControls.HtmlInputButton
Protected WithEvents lbl_area_riservata As System.Web.UI.WebControls.Label
Protected WithEvents drop_lingua As System.Web.UI.WebControls.DropDownList
Protected WithEvents lbl_conferma As System.Web.UI.WebControls.Label
Protected WithEvents OutPutJs As System.Web.UI.HtmlControls.HtmlGenericControl
Protected WithEvents Ctrl_frm As System.Web.UI.WebControls.ValidationSummary
Protected WithEvents Button1 As System.Web.UI.WebControls.Button
Protected WithEvents div_mazzuccato As System.Web.UI.HtmlControls.HtmlGenericControl
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim m_subcomuni As New subcomuni
If Not Page.IsPostBack Then
........................
codice:
Imports System.Data.SqlClient
Public Class subcomuni
Inherits System.Web.UI.Page
Protected WithEvents txt_userid As System.Web.UI.WebControls.TextBox
Protected WithEvents txt_password As System.Web.UI.WebControls.TextBox
Protected WithEvents btn_log As System.Web.UI.HtmlControls.HtmlInputButton
Protected WithEvents lbl_conferma As System.Web.UI.WebControls.Label
Public Sub Login()
If Me.txt_userid.Text = "" Or Me.txt_password.Text = "" Then
..............
facendo così mi da come errore
codice:
Messaggio di errore del compilatore: BC30456: 'm_subcomuni' non è un membro di 'ASP.default_aspx'.