troubleshooting Question

custom form login

Avatar of fwsteal
fwsteal asked on
33 Comments1 Solution623 ViewsLast Modified: 2.0 c# - login form to query a table in sql server 2005 via a stored procedure. I'm not sure how to wirte the c# code and the stored procedure. I need help writing the c# code and the stored procedure.

login.aspx file
<asp:TextBox ID="txtbxSiteCode" runat="server"></asp:TextBox>
<asp:TextBox ID="txtbxPassword" runat="server" TextMode="Password"></asp:TextBox>
<asp:Button ID="btnLogin" runat="server" Text="Log In" OnClick="btnLogin_Click" />

    protected void btnLogin_Click(object sender, EventArgs e)
        strUserId as String = txtbxSiteCode.Text.ToString();
        strPassword as String = txtbxPassword.Text.ToString();
        //qry for userid and password in sql server table
        //if the user has a userid and password then
            //does account have an access? access = 1; no access = 0
            //access = 1 then redirect to secure folder
            //else if no access = 0 then redirect to login.aspx page
        //else redirect to login.aspx

login table:
TABLE [dbo].[ClientLogins]
 [CIDFK] [int] NOT NULL,
 [SiteCode] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
 [SitePassword] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
 [PortalAccess] [int] NOT NULL,

stored procedure:


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 33 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 33 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros