This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > August 2004 > Check to see if username already exists ASP.NET





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Check to see if username already exists ASP.NET
Brian Lantz

2004-08-10, 11:17 pm

I'm using the Dreamweaver ASP.NET controls to register a user and insert
their info into a SQL database... but my problem is I can't figure out how
to check to see if the username already exists in the database when they
click submit!

I'm trying to accomplish is this... if the count is > 0 then display message
that Username already exists:

"SELECT COUNT(*) as UserNum FROM dbo.Members WHERE UserName = @UserName"

<Parameters>
<Parameter Name="@UserName" Value='<%# ((Request.Form["UserName"] != null)
&& (Request.Form["UserName"].Length > 0)) ? Request.Form["UserName"] : ""
%>' Type="VarChar" />
</Parameters>

Any ideas?

lantz


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews