Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 2097 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     .NET and MSSQL :

[ASP.NET\VB] User exists

Thread title: [ASP.NET\VB] User exists
     
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
01-23-2008, 12:17 PM
#5
echoSwe is offline echoSwe
Status: Member
Join date: Jul 2005
Location:
Expertise:
Software:
 
Posts: 185
iTrader: 0 / 0%
 

echoSwe is on a distinguished road

  Old

You should not go by their statements as it (1) requires you to use native SQL in your programming code. (2) Leaves you open for SQL injection, (3) Doesn't take into account the .net infrastructure for Authentication. I can go on with more, but I think this is sufficient. Easiest, depending on what you already got is:
Code:
MembershipUser user = Membership.FindUserByUsername("myUser");
if (user != null)
// go ahead and add
else
    txtMsg.Text = "Sorry, username already in use"; //...
Btw... phpintheusa: this isn't php...

     


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed