Displaying User Name at the right end of Menu

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
jleraj
User
Posts: 11

Displaying User Name at the right end of Menu

Post by jleraj »

Friends

Can someone tell me how to display the user name at the right end of the main menu in ASP.Net maker?

I will be thankful if you could please post the code in VB

Thanks


motfs
User
Posts: 258

Post by motfs »

You can use Startup script (Client Scripts -> Global -> Pages with header and footer -> Startup Script) to add your content anywhere, e.g.:

var x = "<ul class='navbar-right'>" + '@CurrentUserName()' + "</ul>"; // C#
$(".ewMenu .navbar").append(x);


jleraj
User
Posts: 11

Post by jleraj »

Thanks

I tried and it works. But the user name is being displayed as a normal text below the menu bar.

Can you please help further about how to display it along with other menu items ?

Thanks in advance


motfs
User
Posts: 258

Post by motfs »

You can use CSS or append the text with appropriate selector (view HTML source to find). Try to modify yourself first and post the code/css if you encounter issue.


Post Reply