TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sivakumar
NA
551
217.8k
How to check is admin or not after login
Mar 24 2016 2:53 AM
Hi ,
I want to check condition after login is admin or not
This is my code :
data is coming like above image
protected void txtLogin_Click(object sender, EventArgs e)
{
LoginModel login = new LoginModel();
login.UserName = txtUserName.Text;
login.Password = txtPassword.Text;
var result =_loginBL.UserLogin(login);
txtUserName.Text = "";
txtPassword.Text = "";
if (result !=null)
{
Session["userName"] = login.UserName;
//string type = ballogin.usertype(login);
//Session["usertype"] = type;
Response.Redirect("home.aspx");
}
//else if (a == 2)
//{
// Session["userName"] = userName;
// Response.Redirect("adminHome.aspx");
//}
else
{
error.Text = "Enter the valid details";
}
Please help me
Reply
Answers (
8
)
Remove style tag from html string
Using "gitlib2sharp" , I am able to clone the githup project