Click here to Skip to main content
13,003,589 members (66,468 online)
Rate this:
Please Sign up or sign in to vote.
See more:
If a user logged in, the user's full name from database must be in the label or after the word.

Example: Welcome [Firstname Lastname]!.

What are the codes for generating it using class library? I hope you can help me. Thanks!
Posted 26-Nov-12 14:24pm
Sergey Alexandrovich Kryukov 26-Nov-12 20:33pm
What have you done so far?
Jason Paredes 26-Nov-12 20:37pm
protected void Page_Load(object sender, EventArgs e)
if (Session["user"] != null)

Label1.Text = Session["user"].ToString();
else if (Session["user"] == null)
Response.Redirect("Homepage.aspx"); //This my Login Page

I've done that code. but only the username selected is used. I'm trying to know what is the correct code for it. Thanks and Regards!

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

foreach(DataRow dr in Users.Rows)
   UserName.Text=dr["firstName"].ToString() + dr["lastName"].ToString();

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170626.1 | Last Updated 26 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100