Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Simple username checking

Reply
Thread Tools

Simple username checking

 
 
nix
Guest
Posts: n/a
 
      06-07-2005
Hi

I want to create a simple user validation script without using a database.

Let's say I have a text file in my asp folder with a list of valid
usernames. How can i do something like the following using ASP?


// IN: sUsername

try
AUsernameList:=TStringlist.create;
try
AUsernameList.loadfromfile('usernames.txt');
bValidUser:=IndexOf(sUsername)>=0;
except
// OUTPUT AN ERROR TO THE USER
end;
finally
AUsernameList.free;
end;

// OUT: bValidUser


Thanks

nix


 
Reply With Quote
 
 
 
 
nix
Guest
Posts: n/a
 
      06-09-2005
Excellent,

Dave


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple ASP to give IP/time/username? GregO ASP General 4 04-10-2007 09:01 AM
loginview control displays network username instead of (web) username Shailesh Patel ASP .Net Web Controls 0 11-08-2006 08:19 PM
Change the username found in "C:\Documents and Settings\Username" The Reluctant Robot Named Jude Computer Support 1 05-05-2004 07:11 AM
Error in simple binary-checking class Chris Java 3 09-28-2003 12:59 AM
Checking for Empty Dataset -- Simple Question Ron ASP .Net 2 07-10-2003 09:05 PM



Advertisments