The name 'HttpContext' does not exist in the current context
put using System.Web;
and using System;
into the source file...
You need [] instead of ():
string[] strUserInitials = System.Web.HttpContext.Current.Request.ServerVariables["LOGON_USER"].Split(System.Convert.ToChar(@"\"));
You have to reference to System.Web and import the namespace System.Web:
using System.Web;
I would not use Convert at all:
string[] strUserInitials = System.Web.HttpContext.Current.Request.ServerVariables["LOGON_USER"].Split('\\'));