Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 20th, 2010 | Syntax: ASP | Size: 1.81 KB | Hits: 66 | Expires: Never
Copy text to clipboard
  1. newuser.aspx
  2. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  3.  
  4. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="newuser.aspx.cs" Inherits="NewUser.newuser" %>
  5.  
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  7.  
  8. <html xmlns="http://www.w3.org/1999/xhtml" >
  9. <head id="Head1" runat="server">
  10.     <title>Presence</title>
  11. </head>
  12. <body>
  13.     <form id="form1" runat="server">
  14.     <div>
  15.     <h1>Presence</h1>
  16.     <font face="Arial" ptsize="3">Create a new user</font>
  17.     <br /><br />
  18.     <h2>User:</h2>
  19.     <asp:TextBox ID="username" runat="server"/>
  20.     <h2>Password:</h2>
  21.     <asp:TextBox ID="password" runat="server" TextMode="Password"/>
  22.     <br />
  23.     <h2>Reenter Password:</h2>
  24.     <asp:TextBox ID="password2" runat="server" TextMode="Password"/>
  25.     <br />
  26.     <h2>Email:</h2>
  27.     <asp:TextBox ID="email" runat="server"/>
  28.     <h3>Errors:</h3>
  29.     <asp:RequiredFieldValidator ID="passEmpty" runat="server" ControlToValidate="password" ErrorMessage="Empty password!" />
  30.     <asp:CompareValidator ID="passCheck" runat="server" ControlToValidate="password" ControlToCompare="password2" SetFocusOnError="true" ErrorMessage="Passwords don't match!" />
  31.     <asp:Button ID="submit" runat="server" OnClick="createUser" Text="Submit"/>
  32.     </div>
  33.     </form>
  34. </body>
  35. </html>
  36.  
  37.  
  38. newuser.aspx.cs
  39. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  40.  
  41. using System;
  42. using System.Collections.Generic;
  43. using System.Linq;
  44. using System.Web;
  45. using System.Web.UI;
  46. using System.Web.UI.WebControls;
  47.  
  48. namespace NewUser
  49. {
  50.     public partial class newuser : System.Web.UI.Page
  51.     {
  52.         protected void Page_Load(object sender, EventArgs e)
  53.         {
  54.         }
  55.         protected void createUser(Object o, EventArgs e)
  56.         {
  57.         }
  58.     }
  59. }