using asp.net and c# membership provider how to check if the user is registered or not? I want to handle this in code not by using "login status"?
Text + "' and Password= '" + TextBoxSignPass. Text + "'"; SqlCommand cmd = new SqlCommand(checkUser, con); cmd. ExecuteNonQuery(); con. Close();
To configure SQLMembershipProvider, first you need to configure your database. Leave the default selection "Configure SQL Server for application services" and click Next again. Enter the server name, Select SQL Server authentication and enter user id and password as in the following figure.
To create a user in our application by using ASP.NET Membership we need the following steps to complete this process. Step 1: Firstly, open visual studio, then go to File Menu and click New -> Web Site. Step 2: After open the new empty website and add a new item Login. aspx in Registration inside Solution Explorer.
The GetUser method retrieves the user information from the data source and creates a MembershipUser object populated with the returned data. If you use one of the GetUser overloads that does not take a username parameter, GetUser returns the information for the current logged-on membership user.
Not sure if you want to know if they are a "registered" user or have logged in (as the Login status would indicate)
Here's to know if they are logged in (what the Login status uses):
System.Web.HttpContext.Current.User.Identity.IsAuthenticated;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With