I'm pretty new to asp.net and for the life of me i cant seem to get the submit button to call the relevent vb code. Can anyone point me in the right direction? I've stripped almost everything out and left it to just show a message box but nothing, no errors, no warnings. Would seriously appreciate any help here.
Register.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>
register.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
MsgBoxand you'll see that it gets hit. You cannot show a message box in ASP.NET since it would be shown at the server and not at the client.