15,897,137 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 Python 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 Bajpangosh (Top 17 by date)
Bajpangosh
19-Apr-14 15:22pm
View
yes :)
Bajpangosh
16-Apr-14 8:35am
View
both :)
Bajpangosh
15-Apr-14 11:25am
View
here mine question :)
http://www.codeproject.com/Questions/759961/How-Do-I-Make-A-Geo-Location-Tag-With-Google-Maps
Bajpangosh
15-Apr-14 9:44am
View
thnaks it's works. bro can u help a pointer can + set the value to box and save to database any ideas..?
Bajpangosh
15-Apr-14 9:33am
View
oww... the code can bypass my login :( could you help me how too fix it.
Bajpangosh
15-Apr-14 9:30am
View
thakq u r really awesome. it's just a college project. am not trying to host this code in web. and really thankful for mention the sql injection attack :)
Bajpangosh
14-Apr-14 22:40pm
View
here is my login code where did i put "UPDATE MyTable SET LastLoginDate=GETDATE() WHERE UserId=... " code in
protected void login_btn_Click(object sender, EventArgs e)
{
int cnt = 0;
// SqlDataAdapter ad1 = new SqlDataAdapter(@"select Id from UserReg WHERE Name='" + TextBox1.Text + "' AND Password='" + TextBox2.Text + "'", con);
// DataTable dt = new DataTable();
SqlCommand cmd;
SqlDataReader dr;
cmd = new SqlCommand("select Id from UserReg WHERE Name='" + username.Text + "' AND Password='" + password.Text + "'");
con.Open();
cmd.Connection = con;
cmd.ExecuteNonQuery();
dr = cmd.ExecuteReader();
while (dr.Read())
{
// ad1.Fill(dt);
cnt = Convert.ToInt32(dr["Id"].ToString());
}
if (cnt > 0)
{
Response.Redirect("profile.aspx?id=" + cnt); //Response.Redirect("veinpage.aspx?id=" + cnt);
}
else
{
loginchk.Text = "Invalid username or password";
this.loginchk.ForeColor = Color.Red;
}
}
}
Bajpangosh
13-Apr-14 22:13pm
View
thx but it's shows a blank page
Bajpangosh
13-Apr-14 22:10pm
View
thx for helping me bro. maybe it's works but am a newbie in visual studio :(
when i put this code on cs
it's shows an compile error
//Error 19 Use of unassigned local variable 'cmd'
Bajpangosh
13-Apr-14 14:50pm
View
i didn't get you. after successful login how to redirect the logged user profile any ideas>?
Bajpangosh
13-Apr-14 14:46pm
View
run time it's shows an error :(
An exception of type 'System.NullReferenceException' occurred in App_Web_bly0ny4p.dll but was not handled in user code
it's pop-out from
cmd = new SqlCommand("select * from shops where Id=" + Request.QueryString["Id"].ToString());
Bajpangosh
13-Apr-14 14:41pm
View
yes it's working bro but it's does't show the logged user profile :(
Bajpangosh
13-Apr-14 14:37pm
View
yes i did but after login it's does not redirect to the proper profile :(
Bajpangosh
13-Apr-14 14:27pm
View
but help me to display these fetched datas on text box.
just drag the textbox and change the id. is it works or teach me the right way :(
Bajpangosh
13-Apr-14 14:16pm
View
here is my cs code but how to display these fetched datas on aspx page..?
Bajpangosh
13-Apr-14 14:15pm
View
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["VeinConnectionString"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
bindata();
}
}
public void bindata()
{
SqlCommand cmd;
SqlDataReader dr;
cmd = new SqlCommand("select * from shops where Id=" + Request.QueryString["Id"].ToString());
cmd.Connection = con;
cmd.ExecuteNonQuery();
dr = cmd.ExecuteReader();
while (dr.Read())
{
Shops.Text = dr["Shops"].ToString();
Reviews.Text = dr["Reviews"].ToString();
Website.Text = dr["Website"].ToString();
Fbpage.Text = dr["Fbpage"].ToString();
Phone.Text = dr["Phone"].ToString();
Email.Text = dr["Email"].ToString();
Place.Text = dr["Place"].ToString();
Latitude.Text = dr["Latitude"].ToString();
Longitude.Text = dr["Longitude"].ToString();
}
}
Bajpangosh
13-Feb-14 5:10am
View
thx Snehasish Nandy but am a newbie in c# i dont know to code the asp.cs page could you help me..?
Show More