Hi,
In my web application i am using master page concept, In master page i have login panel using this user can login, after login login panel will not visible and a link button will visible as logout, it is working fine but in one of child pages (content page) i have login panel for login which is in update panel, when user login successfully in master page login panel is still visible , it is not suppose to visible, when i page refresh then login panel not visible and logout link button visibling. When i login in child page the login panel in master page also not visible and log out link button will visible can u help me in this case, thank you. This is code:
SqlDataAdapter da = new SqlDataAdapter("select * from xxx where (userid=@UserName or emailid=@UserName) and password=@Password", con);
da.SelectCommand.Parameters.AddWithValue("@UserName", txtUserId.Text);
da.SelectCommand.Parameters.AddWithValue("@Password", txtPassword.Text);
DataSet ds = new DataSet();
da.Fill(ds, "Login");
int i = ds.Tables["Login"].Rows.Count;
if (i == 1)
{
LinkButton lnklogout = (LinkButton)Master.FindControl("LinkLogout");
lnklogout.Visible = true;
LinkButton linkmypro = (LinkButton)Master.FindControl("lnkbtnMyProfile");
linkmypro.Visible = true;
LinkButton linsynup = (LinkButton)Master.FindControl("lbtnSignUp");
linsynup.Visible = false;
Panel pnllogon = (Panel)Master.FindControl("LogonPanel");
pnllogon.Visible = false;
}