User-2004582644 posted
Hi,
I have insert this a public void
called SetUser()
on master page
public void SetUser()
{
Page.User.Identity.Name.ToLower();
}
I need call the SetUser()
from content page Method
(static WebMethod
)
I've tried in this mode, but on VS 2019 debug the error
"an object reference is required for the non-static field, method or property..."
Please can you help me?
my code below
[WebMethod(EnableSession = true)]
[ScriptMethod]
public static void Savepnauttlc(pnauttlcweb teleco)
{
HttpContext.Current.Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.Cache.SetNoStore();
((Mp)Master).SetUser();
}