|
-
Jun 27th, 2002, 04:07 AM
#1
Thread Starter
Junior Member
A good password code for a form
Last edited by devil200; Jun 28th, 2002 at 08:10 PM.
-
Jun 28th, 2002, 12:57 AM
#2
Thread Starter
Junior Member
I mean a good password and login thingy for a form
-
Jun 28th, 2002, 08:11 PM
#3
Thread Starter
Junior Member
-
Jun 29th, 2002, 07:21 PM
#4
Not enough info... do you mean a simple Username and password without encryption, or some sort of heavy duty coding ... hey a really simple one for ya
Code:
<%@ Page language="VB" %>
<script runat="server">
sub Page_Load(Sender as Object, e as EventArgs)
' If the page has posted back results, then check them
if IsPostBack Then
' Grab the username and password fields
dim strUserName as string = Request("username")
dim strPassword as string = Request("password")
' Write out a success/failure message
if (strUserName = "Joe Smith") and (strPassword = "secret") then
Response.Write("<h2>Log on successful as " & strUserName & "</h2>")
else
Response.Write("<h2>Your username/password were not found.</h2>")
end if
end if
end sub
</script>
<html>
<body>
<h2>Welcome to the Sample Login Page</h2>
<form runat="server">
<table>
<tr>
<td>Username:</td>
<td><input type="text" name="username"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" value="Login">
</td>
</tr>
</table>
</form>
</body>
</html>
Cool huh....
-
Jun 29th, 2002, 07:26 PM
#5
Other than that create a form chuck two textboxes on it and a button.
Call one textbox "txtUser"
Call the other "txtPassword" and change the Password Char to "*".
Name the button cmdOK or whatever. When the user clicks it check that you have something entered in both textboxes and verfiy it's ok....
As Cander stated, not enough info....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|