TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
wyndel villanueva
NA
14
17.4k
How Session display to a label
Oct 29 2012 5:12 AM
Hi, Please help anyone.
I want to display user, like Welcome, (user).
<div class="header">
<span class="right">
<strong>welcome,
<asp:Label ID="agentCode" runat="server" Text='<%# Session["Agent_code"] %>'></asp:Label>
</strong>
................................................................................................................................................................
protected void Page_Load(object sender, EventArgs e)
{
try
{
DataSet dsUser = (DataSet)Session["USER"];
if (dsUser.Tables[0].Rows.Count > 0)
{
agentCode = dsUser.Tables[0].Rows[0]["Agent_code"].ToString();
userType = dsUser.Tables[0].Rows[0]["User_type"].ToString();
username = dsUser.Tables[0].Rows[0]["Agent_code"].ToString();
usermail = dsUser.Tables[0].Rows[0]["Email"].ToString();
}
else
{
logout();
}
}
catch (Exception ex)
{
string err = ex.Message;
logout();
}
..Thanks
Reply
Answers (
2
)
How to capture images from webcam and store i database in asp.net
Button click problem