Trying to create a simple form:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="register.aspx.cs" Inherits="AlphaPack._Default"
MasterPageFile="MasterPages/Main.master"
title="Hi there!"
%>
<script runat="server">
public void regSubmit()
{
statusLabel.Text = "Submitted!";
}
</script>
<asp:content id="Content1" contentplaceholderid="mainContent" runat="server">
<form id="registerForm" runat="server">
<asp:Label runat="server" id="statusLabel"></asp:Label>
<asp:Button id="id" text="Register" OnClick="regSubmit" runat="server" />
</form>
</asp:content>
hope it's obvious what I'm trying to do, someone clicks the button and it submits the form and changes the label text.
Compiler Error Message: CS0123: No overload for 'regSubmit' matches delegate 'System.EventHandler'
I know I'm doing something fundamentally wrong here, i'm new to .net moving over from classic ASP.