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
Why do we use polymorphism in oops?
What do you mean by overloading?
what type of question are asked in thoughtworks pair programming round ?
What is the highest level of cohesion?
assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).
Why we use classes in oop?
What does <> mean pseudocode?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
What are constructors in oop?
when to use 'mutable' keyword and when to use 'const cast' in c++
What is inheritance in oop?
IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?
What is polymorphism give a real life example?
What is a null tree?
What is destructor give example?