16,012,223 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 13432601 (Top 8 by date)
Member 13432601
3-Oct-17 1:59am
View
Lol
Member 13432601
29-Sep-17 8:37am
View
//this is my code in loginpage
SqlConnection conn = new SqlConnection(cs);
conn.Open();
SqlCommand cm = new SqlCommand("Select count(*) from tbl_User where Username='" + txtbox_UN.Text + "'", conn);
int temp = Convert.ToInt32(cm.ExecuteScalar().ToString());
if (temp == 1)
{
SqlConnection con = new SqlConnection(cs);
con.Open();
SqlCommand cmd = new SqlCommand("Select Password from tbl_User where Username='" + txtbox_UN.Text + "'", con);
string password = cmd.ExecuteScalar().ToString();
if (password == txtbox_PW.Text)
{
Session["New"] = txtbox_UN.Text;
Response.Write("Password is Correct");
Response.Redirect("Session.aspx");
}
else
{
Response.Write("Password is Incorrect");
}
}
else
{
Response.Write("Username is invalid");
}
Member 13432601
29-Sep-17 8:13am
View
Deleted
//this is my code in loginpage
SqlConnection conn = new SqlConnection(cs);
conn.Open();
SqlCommand cm = new SqlCommand("Select count(*) from tbl_User where Username='" + txtbox_UN.Text + "'", conn);
int temp = Convert.ToInt32(cm.ExecuteScalar().ToString());
if (temp == 1)
{
SqlConnection con = new SqlConnection(cs);
con.Open();
SqlCommand cmd = new SqlCommand("Select Password from tbl_User where Username='" + txtbox_UN.Text + "'", con);
string password = cmd.ExecuteScalar().ToString();
if (password == txtbox_PW.Text)
{
Session["New"] = txtbox_UN.Text;
Response.Write("Password is Correct");
Response.Redirect("Session.aspx");
}
else
{
Response.Write("Password is Incorrect");
}
}
else
{
Response.Write("Username is invalid");
}
Member 13432601
29-Sep-17 5:54am
View
Wait i will make a page where the user can login
Member 13432601
28-Sep-17 20:05pm
View
I have 3 tables in my database tbl_User, tbl_Category, tbl_NewsArticles
I used session to open the account of user.
Member 13432601
28-Sep-17 10:16am
View
I'm just a begginer
Please explain the authentication.
Member 13432601
28-Sep-17 10:11am
View
What authentication ?
Member 13432601
27-Sep-17 16:38pm
View
Thank you very much
Show More