I am trying to create instance of class and and call a method of this class
that creates a global variable which is available in anywhere in the page..
Here is what i am doing.. but i am getting build error message as shown:
C:\Inetpub\aspnet\intranet\bs\request.aspx.cs(45):
'intranet.departments.building_services.request.NT Security' denotes a 'field'
where a 'class' was expected
The line in question is:
protected string LogonUser = NTSecurity.getLogonUser();
Basically i want to access this variable from any mothods inside the page
without keeping calling this line of code in every methods.
public class request : System.Web.UI.Page
{
protected security NTSecurity = new security();
protected string LogonUser = NTSecurity.getLogonUser();
private void Page_Load(object sender, System.EventArgs e)
{
}
any suggestion how? many thanks in advance