Retreiving User Details


I am using the following web method to retreive users details:-

public class Person


public string user_id, username, password, email, avatar, date_added, real_name, location, website, occupation, interests, forum_posts;


[WebMethod(Description = "This web method will display the profile of specific users.")]public Person User_Details(int id)


Person user = new Person();

const string connStr = "Provider=Microsoft.Jet.OleDb.4.0; " + "Data Source=|DataDirectory|forum.mdb;";

OleDbConnection dbConn = new OleDbConnection(connStr);

string sqlStr = "SELECT [user_id], [username], [password_test], [avatar], [date_added], Email, [real_name] " +"[location], [website], [occupation], [interests], [forum_posts] FROM members WHERE user_id = '" + id + "'";


OleDbCommand dbCommand = new OleDbCommand(sqlStr, dbConn);

OleDbDataReader dbReader = dbCommand.ExecuteReader();while (dbReader.Read())


user.user_id = dbReader["user_id"].ToString();

user.username = dbReader["username"].ToString(); = dbReader["email"].ToString();

user.avatar = dbReader["avatar"].ToString();

user.date_added = dbReader["date_added"].ToString();

user.real_name = dbReader["real_name"].ToString();

user.location = dbReader["location"].ToString(); = dbReader["website"].ToString();

user.occupation = dbReader["occupation"].ToString();

user.interests = dbReader["interests"].ToString();user.forum_posts = dbReader["forum_posts"].ToString();



return user;


the website i am creating is a forum. Here users can click on other users names and view their profile.. What i need to do is consume this web service so that i can do this.. but i dont know how exactly to do it?

I did try with the following code..

localhost.Service myws = new localhost.Service();

localhost.Person member = new localhost.Person();

member.user_id = Request.QueryString["ID"];

Label1.Text = member.username;

Label2.Text = member.date_added;

But it does not work, the querystring holds the user_id of the user so i thought from this it would be easy to pull out everything else..

Any help would be much appreciated.



5/5/2009 12:44:19 AM 91979 articles. 2 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 50

It looks like you need to call the web service:

Person member = myws.User_Details(userid);

Steve Wellens

My blog
5/5/2009 1:05:30 AM

Similar Artilces:

Getting user details
I have created an intranet site using 2.0 and I am using window authentication for my security.I am able to retrieve the user name of the person accessing my intranet site from using User.Identity.Name. I want to be able to retrieve other details held on the active directory server such as the user's first name, surname, branch(group) etc instead of having to create a user table in my SQL Server database which the site is connected to. Is this possible through 2.0? If so could you point me in the right direction on how to do this as im new to

Getting Start With .net
hi i'm intersted to learn (vb or delphi) . i programming with delphi6 but i'd like to tp know something about programming in internet specially with .net . i hear about with delphi 7 that i can programming with delphi in .net .... is it right ? what 's our opinian about it ? and better to learn Vb.Net or continu with delphi(or thanks. Ali Darabian I think there is some support for Delphi in .Net. However, you will find much more support from the user community if you choose a more popular language such as VB.Net or C#. Since your al...

Getting User Details
Can anyone tell me the method that will return the current users details? taken from Admin\Users\Register.ascx.vb Dim users As New UserController Dim objUserInfo As UserInfo = users.GetUser(PortalId, Int32.Parse(Context.User.Identity.Name)) McKelt Solutions Thanks for that works a treat...

how to get start with .NET
the net help people installed  to my desktop 1-microsoft visual studio .NET enterprise developer 2003 2-microsoft .NET framework 1.1 what else do i need ...???  and how can i try with some simple code in VS.Net and run it to see wat happen...????? please help If you want to develope web applications, then you'll also need IIS on your PC.  That'll require XP-Professional or Windows 2000/2003, but XP-Home edition won't allow IIS installation. As for how to get started, you can search the web for some tutorials or buy a good book on VS.  The topic is way too vast to...

Session problem(Previous Users log-in details are getting displayed/withheld for the current user)
Hi we've hosted Bugzilla in windows 2000 server & it has been used by many users at a given time.we've been getting this peculiar Session a user logs-in, the page that he visits contains the details of another user who has just signed out from bugzilla.Any & all suggestions are welcome. Regards Tamil ...

Where to start and how did you get started?
Hi, I have had a feeling for a long time to jump into the adds market for some time due to my low income (shooting for the stars) and I don't have anything better to do these days. But I find it really difficult not to give up due to lack of guides (what I can find atleast) and all the hard words which only makes me confused. But I won't give up. Never. Not sure if this is the right place to post this, but I deffinitly would be really greatfull for help getting started. How did you get started? +If there are any teacher that wanna show me the ropes private, I can give payment with ...

Can't get AD user detail information to populate when user surfs to site for first time (Windows Authentication Turned on)
I am hoping that someone might shed some light on this.  I have DNN 3.2 loaded and all works fine.  I went to the Authentication module and setup that with windows authentication turned on and setup my AD settings and clicked Update.  Everything came back with "OK" status.   My problem is that when a user naivigates to the site their detail information is not being pulled from AD and populating the DNN user profile.  All that is getting populated is the username.  "YES" there is full information for all 300 + users in my AD profiles.  In previous versi...

get error Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.
Hi,my interaction with database is completely lost. I cannot even open database and view tablesI get error Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.I am using VS 2005  Error log: SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.2008-09-07 13:10:03.51 Server      Detected 1 CPUs. This is an informational message; no user action is required.2008-09-07 13:10:28.40 Server   &...

Get User Details from ADList
 The following code attempts to get the details of a User from ADList. But the problem is that dsSearch.FindAll() returns zero and hence not able to get the details of user.Can somebody point out whats the issue belows !! DirectoryEntry entry = new DirectoryEntry(LDAP://OU=UserAccounts,DC=xyz,DC=xyz,DC=abc,DC=com);DirectorySearcher dsSearch = new DirectorySearcher(entry); dsSearch.Filter = "CN=" + "MyName";foreach (SearchResult rs in dsSearch.FindAll()) {sr1 += Convert.ToString(rs.GetDirectoryEntry().Properties["mail"].Value) + Convert.ToString(rs.Get...

How do I get started with AJAX.Net?
Hi All, I'm a seasoned developer but have not yet ventured into atlas et al.  I prefer books, but will take whatever I can get if it's good and will get me going. Any recommendations? Thx in advance. Jeff try here first then learn from sample and docJames Wu (MIB426).NET is only way to goMCP, MCSE, MCDBA, MCSD, MCAD I find the materials online display features and implementations but are lacking architectural depth, and am seeking more comprehensive resources. By architectural depth, I mean that I cannot watch ...

Getting Started with .net and a few questions
Hello I've done some asp and php programming along with various other languages in the past and slowing getting my head around .net.I have a small project of creating a Holiday Booking system on our Intranet and just trying to get the first part to work properly will hopefully get me sorted for the whole project. The Intranet is running on .net 2 and I prefer to use the VB code rather than C#. This is connecting to an SQL server.My initial page that I am trying to create is just for an admin user to view which dates in a table have been specified as Bank Holidays and be able to add ...

Started getting error for SOME users.
I've started to get a few others to add accounts to the TT web pages and have started getting the error below when the following line in TimeEntry.aspx.cs is executed: //Select User Drop Down to the correct value. UserList.Items.FindByValue(_user.UserID.ToString()).Selected=true; The _user.UserID = 11 in the immediate window when I enter ?_user_UserID <enter>, but if I try to add the ToString() method, it tells me "error: '_user.UserID.ToString' does not exist" Some users work correctly, some get the error. They haven't set up any projects yet, so the only table w...

Getting started .net website
Hi folks,Does anyone here know of a good website to just sit back and read for learning .net? Thanks in advance.Baldeep Right here... Click the Get Started and Learn sections here. Quite a few out there - - this one, has a lot of good videos -  also, but then, I might be a little prejudiced David WierMCP/ - where to look first!Please Vote for ASPNet101 - 'Best Community Resource'!Control Grouper - easily control properties for multiple controls with one control!Calendar Express - The Best HTML Calendar Generator on the web!(P...

Getting started with JScript.NET
I'm a Javascript and Actionscript developer, and the thought of being able to do server-sides in something I know was too good to resist. Does anyone know some good tutorials for developing ASP.NET pages in JScript?  I can find lots of console code, but simple things are hard: like I can't even figure out how to print something out to the web page (just a string). What I'm really trying to do is access a database, verify a login, and print JSON out to the response.  What should I do to start?  Is there a better way to do this? (IE: using some JSON library already?). I'm commun...

Web resources about - Retreiving User Details -

Geotagging – one day later
The First Day When we were doing our projections for how many photos Flickr members would geotag, we though that we’d hit a million in the first ...

User Terence Eden - Stack Overflow
current community chat blog Stack Overflow Meta Stack Overflow Stack Overflow Careers your communities Sign up or log in to customize your list. ...

Log in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here Sumisha Naidu @ sumishanaidu ...

Wikipedia talk:WikiProject Sociology/Archive 5 - Wikipedia, the free encyclopedia
Culture has been nominated for a good article reassessment . Articles are typically reviewed for one week. Please leave your comments and help ...

Patient zero: ‘healer’ claimed to have powers to cure Ebola before she died of the disease
A herbalist working in a remote village in Sierra Leone who claimed she had special powers to cure Ebola may have helped the disease spread across ...

Member Login - Peoplebank Australia - IT Jobs and IT Recruitment
Peoplebank are Australias leading IT Recruitment Company Peoplebank have a focus on Temporary IT Recruitment Contract IT Recruitment Executive ...

IOS 7 - what do/don't you like - iPhone - Whirlpool Forums
... I like pretty much all of it, except the fact that you can no longer restrict how many email messages it downloads. It has been retreiving ...

How To Develop with Programmable Web API - APIhub
A Note from the Editor in Chief of In April 2014, ProgrammableWeb was both replatformed and redesigned. As a part of the ...

Arthrex - Forgot Username
Apps Arthrex Vet Systems TPT Online Shopping Germany / English Country: Afghanistan Åland Islands Albania Algeria ...

Conference App Secrets Part 3: JSON vs XML
Guest post by Ekkehard Gentz, BlackBerry Elite Developer This is Part 3 of my series, "Conference App Secrets." In Part 1, I demonstrated How ...

Resources last updated: 12/26/2015 11:54:58 PM