I’m trying to add a “Username” under the image logo of my webpage after User login.
I want to add Session variable here to capture the username and after that want to call the “Session” value in the html code under the logo of my webpage.
My C# file code (Main.cs) file name
: [ModuleMethodAttribute(Require_Post = true)]
public string Auth(string Username, string Password, string CompanyRpt)
{
AuthenticationRequest Login = new AuthenticationRequest();
Login.Username = Username;
Login.Password = Password;
if (Result.Authenticated)
{
Result.Commit();
Instance.Session.Add("CompanyRpt", CompanyRpt);
HttpContext.Current.Response.Redirect("/index.html");
return "";
}
else
{
return "login failure - " + Result.Message;
}
}
My Navigation HTML file code:

The username should appear under the image that has been called here.
Abhishek KumarPosted Sep 15, 2014, 11:30 AM
1. Add user Name in Session varable.
2.Use this below to get the detail in HTML code.
Welcome <%=Server.HtmlEncode(Session["user"])%>
Hope this will help
Abhishek
Murugesh PPosted Sep 15, 2014, 10:44 AM