Hi Guys this is the Login Page with the snipped:
and another snipped on another form where:
However when i run this code i get the buttons disabled even for admin n
normal user's as well..
Please Help
i even tried
but no...
Code:
public int m = 0;
string user = Usernametxt.Text;
if (user.Equals("Admin"))
{
m = 1;
}
else { m = 0; }
and another snipped on another form where:
Code:
private void HomePagefrm_Load(object sender, EventArgs e)
{
Loginfrm objLoginfrm = new Loginfrm();
//int z=objLoginfrm.m;
//int k=1;
if (objLoginfrm.m==1)
{
Register_btn1.Enabled = true;
Report_btn.Enabled = true;
}
else
{
Register_btn1.Enabled = false;
Report_btn.Enabled = false;
}
}
However when i run this code i get the buttons disabled even for admin n
normal user's as well..
Please Help
i even tried
Code:
if (objLoginfrm.m==1)
{
Register_btn1.Enabled = true;
Report_btn.Enabled = true;
}