Read the title.
Printable View
Read the title.
I mean a good password and login thingy for a form
anyone
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
Cool huh....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>
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....