15,895,606 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 Hamza Javed (Top 18 by date)
Hamza Javed
3-Feb-15 9:41am
View
Deleted
i have done like this:
param[0] = new ReportParameter("ProductCategoryID", "35");
Hamza Javed
3-Feb-15 9:36am
View
Thanx.......
Now i,m not getting any exception but report is keep on loading in browser and not showing any result except showing loading image of report
Hamza Javed
3-Feb-15 9:27am
View
ok please wait i try
Hamza Javed
3-Feb-15 9:24am
View
hmmmmmm
ID is actually number but i tried to Convert "ProductCategoryID" into Int but cant do.it accepts only string parameters. can you please tell me how to convert? Actually it gives me exception at: ReportViewer1.ServerReport.SetParameters(param);
Hamza Javed
7-Jan-15 11:02am
View
Can you please elaborate because there is no any property showing of ApplyChanges in my case. i tried following:
db.web_user.ApplyChanges(UserDetails);
and
db.ApplyChanges(UserDetails);
both are not working :(
Hamza Javed
7-Jan-15 10:50am
View
yup.....
its doing well
Hamza Javed
7-Jan-15 10:49am
View
I have already checked it, no effect.
Hamza Javed
5-Jan-15 10:56am
View
I'm not getting any error. when this page(Profile.aspx) is loaded, all the user's info is non-editable. Edit button make them editable. let i changed the UserName and email and Click on SaveChanges button. In debug mode i saw that text boxes of this page in "btn_profileSaveChanges_Click" never show/have the data which i write in editing mode in these textBoxes. these textBoxes always show the data which is auto-populated on pageLoad.
second thing is the "db.SaveChanges()" is built-in function. it is just used to save any change in database like "SubmitChanges()".
Hamza Javed
5-Dec-14 9:47am
View
Thanks for your time :)
Hamza Javed
5-Dec-14 9:45am
View
Hmmmmmmmm
ok i will. Thanks :)
Hamza Javed
30-Nov-14 2:12am
View
actually i am reading all the nodes(A, B, C.........) from text file as string and edges between them as integer. In BFS function,at the end, i am doing "e.add(a)" which is giving me error that change the type of "a" as node and when i do it it creates error in my add() function because it takes string. i dont now what to do it :(
Hamza Javed
19-Nov-14 11:04am
View
ok thanks a lot :)
Hamza Javed
19-Nov-14 8:48am
View
sorry that session code i just try and forgot to remove it. my actual code is without session line. but by including that line i'm getting nothing. i dont know whether i use that session code correct or not because i am using it first time.
can you please guide me if you feel easy?
Hamza Javed
19-Nov-14 8:29am
View
I could not understand this. Here is my login page code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Project_sn
{
public partial class Default : System.Web.UI.Page
{
SocialNetwork_DBEntities sn_DBEntities = new SocialNetwork_DBEntities();
web_users user = new web_users();
public void add_user(object sender, EventArgs e)
{
try
{
user.Firstname = tbox_firstName.Text;
user.Lastname = tbox_lastName.Text;
user.Email = tbox_email.Text;
user.DOB = Convert.ToDateTime(tbox_DOB.Text);
if (Radio_male.Checked == true)
{
user.Gender = "Male";
}
else
{
user.Gender = "Female";
}
user.Username = tbox_userName.Text;
user.Password = tbox_password.Text;
user.Biography = tbox_biography.Text;
sn_DBEntities.web_users.Add(user);
sn_DBEntities.SaveChanges();
lbl_conformRegister.Visible = true;
}
catch (Exception)
{
Console.WriteLine("an error occured!");
}
}
public void btn_login_Click(object sender, EventArgs e)
{
var userInfo = sn_DBEntities.web_users.Where(u=> u.Username == tbox_loginUserName.Text && u.Password == tbox_loginPassword.Text).FirstOrDefault();
if (userInfo != null)
{
Session["Email"] = tbox_email.Text;
Response.Redirect("ProfilePage.aspx", false);
}
else
{
lbl_loginError.Visible = true;
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
and this is my profile page empty code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Project_sn
{
public partial class ProfilePage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
please help me i could not understand your code
Hamza Javed
17-Nov-14 9:05am
View
actually i'm new in C# and asp.net. i could not understand userId in (x=>x.UserId==userId)
sorry for such a stupid question but can you explain me more code?
Hamza Javed
17-Nov-14 8:26am
View
this is my C# code for login and registration:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Project_sn
{
public partial class Default : System.Web.UI.Page
{
SocialNetwork_DBEntities sn_DBEntities = new SocialNetwork_DBEntities();
public void add_user(object sender, EventArgs e)
{
try
{
web_users user = new web_users();
user.Firstname = tbox_firstName.Text;
user.Lastname = tbox_lastName.Text;
user.Email = tbox_email.Text;
user.DOB = Convert.ToDateTime(tbox_DOB.Text);
if (Radio_male.Checked == true)
{
user.Gender = "Male";
}
else
{
user.Gender = "Female";
}
user.Username = tbox_userName.Text;
user.Password = tbox_password.Text;
user.Biography = tbox_biography.Text;
sn_DBEntities.web_users.Add(user);
sn_DBEntities.SaveChanges();
lbl_conformRegister.Visible = true;
}
catch (Exception)
{
Console.WriteLine("an error occured!");
}
}
public void btn_login_Click(object sender, EventArgs e)
{
var userInfo = sn_DBEntities.web_users.Where(u=> u.Username == tbox_loginUserName.Text && u.Password == tbox_loginPassword.Text).FirstOrDefault();
if (userInfo != null)
{
Response.Redirect("ProfilePage.aspx", false);
}
else
{
lbl_loginError.Visible = true;
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
Hamza Javed
17-Nov-14 8:20am
View
Deleted
this is for login code
Hamza Javed
17-Nov-14 8:20am
View
Deleted
here is my C# code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Project_sn
{
public partial class Default : System.Web.UI.Page
{
SocialNetwork_DBEntities sn_DBEntities = new SocialNetwork_DBEntities();
public void add_user(object sender, EventArgs e)
{
try
{
web_users user = new web_users();
user.Firstname = tbox_firstName.Text;
user.Lastname = tbox_lastName.Text;
user.Email = tbox_email.Text;
user.DOB = Convert.ToDateTime(tbox_DOB.Text);
if (Radio_male.Checked == true)
{
user.Gender = "Male";
}
else
{
user.Gender = "Female";
}
user.Username = tbox_userName.Text;
user.Password = tbox_password.Text;
user.Biography = tbox_biography.Text;
sn_DBEntities.web_users.Add(user);
sn_DBEntities.SaveChanges();
lbl_conformRegister.Visible = true;
}
catch (Exception)
{
Console.WriteLine("an error occured!");
}
}
public void btn_login_Click(object sender, EventArgs e)
{
var userInfo = sn_DBEntities.web_users.Where(u=> u.Username == tbox_loginUserName.Text && u.Password == tbox_loginPassword.Text).FirstOrDefault();
if (userInfo != null)
{
Response.Redirect("ProfilePage.aspx", false);
}
else
{
lbl_loginError.Visible = true;
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
Show More