Click here to Skip to main content
15,063,287 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a web application.Now i need to display the login name(user id by which he/she logged in) on next redirected page (i.e welcome abhishek).
I have done it.Now problem is I want to display this Welcome Abhishek in any control(i.e. label or panel).
I have used session object in login page .
On next page in Page_Load() i have kept
string myvalue = (string)Session["UserId"];
Response.Write("Welcome"+ myvalue);

It is working fine but I want diplay it in any control(i.e. with label or panel).

Pls help me.

Thanks
Abhishek
Posted
Updated 25-May-11 0:46am
v2
Comments
raju melveetilpurayil 25-May-11 6:47am
   
[edit] edited for readability[/edit]

1 solution

so whats problem in that...
u can write like.

C#
string myvalue = (string)Session[UserId];

Label1.Text="Welcome, "+myvalue+"";
   
Comments
abhiamity86 25-May-11 6:47am
   
Thanks Ashish
Ashishmau 25-May-11 6:49am
   
If it solves ur problem, then accept answer

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




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900