First of all, are you aware of the new security features in ASP.NET 2 through the Membership and Role providers? In many cases, authentication like this is taken care of completely. Worth looking into.
http://quickstarts.asp.net/QuickStar...y/default.aspx
Secondly, if you post code here, can you please trim it a little so it just shows the relevant pieces? Right now, there's a lot of commented code that just makes it harder to see what's going on.
Next, take a look at this:
while (objReader.Read())
{
What are you "whiling" here? Considering a standard query that retrieves a user, you would normally expect one record, for a single user, so there's nothing to loop.
However, in your case, you're not even selecting anything. So, there's no data to read, and nothing to loop through. All you do is assign a *return value* the value of 1 or 0. This means your procedure never returns any data; all it does is return a return value.
So, you should set up a return value parameter for the Command object. Take a look here: http://msdn2.microsoft.com/en-us/library/59x02y99(VS.80).aspx for some ideas about the return value parameter.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
ASP.NET 2.0 Instant Results and
Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out
this post.