-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathControlPanel.aspx.cs
More file actions
45 lines (38 loc) · 1.24 KB
/
ControlPanel.aspx.cs
File metadata and controls
45 lines (38 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
public partial class ControlPanel : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
private void AuthenticateData()
{
if (Login1.UserName.Trim()=="Root@2020" && Login1.Password.Trim()=="Root@2020") //true
{
Panel1.Visible = true;
Panel1.Enabled = true;
Panel2.Visible = true;
Panel2.Enabled = true;
Login1.Visible = false;
Login1.Enabled = false;
HtmlGenericControl FooterControl = (HtmlGenericControl)Page.Master.FindControl("ContentFooter");
FooterControl.Visible = false;
HtmlGenericControl header = (HtmlGenericControl)Page.Master.FindControl("main_header");
header.Visible = false;
}
else //false
{
Login1.FailureText = "username or password incorrect";
Login1.FailureTextStyle.ForeColor = System.Drawing.Color.Red;
}
}
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
AuthenticateData();
}
}