How to retrive user name from Master Page control (Lable) and Display in aspx page.

Posted by Aadikumary under C# on 11/24/2014 | Points: 10 | Views : 424 | Status : [Member] | Replies : 3
Hi,

i am developing login page it contains Master page , masterpage contains login controls, after login i want to display User Name in content page(.ASPX)

How to retrive user name from Master Page control (Lable) and Display in aspx page.

using C#

Help me ..


Thanks
Aadi Kumar




Responses

Posted by: Ogipansrk on: 11/24/2014 [Member] Starter | Points: 25

Up
0
Down


Aadi use the below code format.

Label data = (Label) this.Master.FindControl("Label1");
var d = data.Text;

Hope this helps !!

Aadikumary, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pradeepk on: 11/24/2014 [Member] Starter | Points: 25

Up
0
Down
Use Query String to pass User Name from master page to .aspx page

pradeep

Aadikumary, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Only4ram on: 11/25/2014 [Member] Starter | Points: 25

Up
0
Down
Hi,

Use session to show username
in .aspx page

Aadikumary, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response