I want to call a class file to return a boolean value. How do I call the method from my CodeBehindPage. I've tried something like this but it doesn't return the value from my Class file.
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
{
bool result = true;
result = Testing.Test123(User.Text, Password.Text);
//Testing is my Class file name and Test123 is the Method name.
if ((result == true))
Response.Redirect("~/Test.aspx");
else
lblText.Text = "ERROR!";
}
}
}