-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuserprofile.aspx.cs
38 lines (35 loc) · 1.17 KB
/
userprofile.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace RegisterLogin
{
public partial class userprofile : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
LblName.Text = Session["fullname"].ToString();
Lbldob.Text = Session["dateofbirth"].ToString();
Lblcontact.Text = Session["contact"].ToString();
HttpCookie cookie = Request.Cookies["UserInfo"];
if (cookie != null)
{
Lblemail.Text = cookie["email"];
Lblpassword.Text = cookie["password"];
}
if(Session["role"].Equals("admin"))
{
LblName.Text = "Hello Admin";
Lbldob.Text = "There is no info";
Lblcontact.Text = "There is no info";
Lblemail.Text = "There is no info";
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("updateprofile.aspx");
}
}
}