what is the main difference between c and c++?
Answer Posted / lalit
public int validateuser(string username, string passwd)
{
con.Close();
con.Open();
cmd = new SqlCommand("sp_VALIDATION",con);
rd = cmd.ExecuteReader();
bool b = rd.Read();
if (b == false)
{
if (FormsAuthentication .Authenticate
(username ,passwd ))
return 2; //For Administrator
else
return 0; //For Unauthorized
User
}
else
return 1; //For Normal User
}
***************************************************
protected void btnenter_Click(object sender, EventArgs e)
{
int tempvar= stdinfo.validateuser
(txtboxadminname.Text ,txtboxpassword.Text);
if (tempvar == 2)
Response.Redirect("Admin/AdminHomePage.aspx");
else
lblerrormsg.Text = ("You Are Not Authorized
Admin!");
lblerrormsg.Visible = true;
}
Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
What is debug class?what is trace class? What differences are between them? With examples.
Can main method override?
What is ambiguity in inheritance?
What is abstract class in oop?
What is the significance of classes in oop?
Can we have inheritance without polymorphism?
What is class in oop with example?
Is this job good for future? can do this job post grduate student?
What is cohesion in oop?
Why do we need oop?
c++ program to swap the objects of two different classes
What is overloading and its types?
What is abstraction and encapsulation?
What is a superclass in oop?