-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdmin.aspx.cs
47 lines (42 loc) · 1.22 KB
/
Admin.aspx.cs
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
46
47
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
public partial class Admin : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["Email_ID"] == null)
{
Response.Redirect("Home.aspx");
}
lblCurrentUser.Text = Session["Email_ID"].ToString();
lblLoginTime.Text = DateTime.Now.ToString();
}
protected void btnManageUser_Click(object sender, EventArgs e)
{
Response.Redirect("AdminUser.aspx");
}
protected void btnManagePost_Click(object sender, EventArgs e)
{
Response.Redirect("AdminPost.aspx");
}
protected void btnManageComment_Click(object sender, EventArgs e)
{
Response.Redirect("AdminComment.aspx");
}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
Session.Remove("Email_ID");
Response.Redirect("Home.aspx");
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("ContactUs.aspx");
}
}