我对asp.net 很陌生,对于我的生活,我似乎无法获得提交按钮来调用相关的vb 代码。谁能指出我正确的方向?我几乎把所有东西都去掉了,只显示一个消息框,但什么也没有,没有错误,没有警告。非常感谢这里的任何帮助。
注册.aspx
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/anonymous/anonymous.Master" CodeBehind="register.aspx.vb" Inherits="mynamespace.register" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<form id="register" method="post">
<asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-mail:</asp:Label>
<asp:TextBox ID="email" runat="server" CssClass="textEntry"></asp:TextBox><br />
<asp:Button ID="submit" runat="server" Text="Create Account"/>
</form>
</asp:Content>
注册.aspx.vb
Imports System.Web.Configuration
Imports System.Data.SqlClient
Public Class register
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Private Sub submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles submit.Click
MsgBox("submit clicked!!", 65600, "New Message")
End Sub
End Class