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
Can you explain polymorphism?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
can we make game by using c
What is the types of inheritance?
#include
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.
Why do while loop is used?
What are the three parts of a simple empty class?
What is the oops and benefits of oops programming?
Can you inherit a private class?
Which is not an object oriented programming language?
What is variable example?
what is the drawback of classical methods in oops?
Where You Can Use Interface in your Project
What is polymorphism what is it for and how is it used?