Untitled
By: a guest | Mar 20th, 2010 | Syntax:
ASP | Size: 1.81 KB | Hits: 66 | Expires: Never
newuser.aspx
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="newuser.aspx.cs" Inherits="NewUser.newuser" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Presence</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>Presence</h1>
<font face="Arial" ptsize="3">Create a new user</font>
<br /><br />
<h2>User:</h2>
<asp:TextBox ID="username" runat="server"/>
<h2>Password:</h2>
<asp:TextBox ID="password" runat="server" TextMode="Password"/>
<br />
<h2>Reenter Password:</h2>
<asp:TextBox ID="password2" runat="server" TextMode="Password"/>
<br />
<h2>Email:</h2>
<asp:TextBox ID="email" runat="server"/>
<h3>Errors:</h3>
<asp:RequiredFieldValidator ID="passEmpty" runat="server" ControlToValidate="password" ErrorMessage="Empty password!" />
<asp:CompareValidator ID="passCheck" runat="server" ControlToValidate="password" ControlToCompare="password2" SetFocusOnError="true" ErrorMessage="Passwords don't match!" />
<asp:Button ID="submit" runat="server" OnClick="createUser" Text="Submit"/>
</div>
</form>
</body>
</html>
newuser.aspx.cs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace NewUser
{
public partial class newuser : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void createUser(Object o, EventArgs e)
{
}
}
}