Why the obsession with "3 tier". It's n-tier and it doesn't make stupid coding mistakes like this impossible:
You might want to take a closer look at the code in your Button2_Click handler. See anything wrong with this:
protected void Button2_Click(object sender, EventArgs e)
{
csBL bl=new csBL();
string name = TextBox1.Text;
string age = TextBox2.Text;
string address = TextBox3.Text;
name = bl.Search().ToString() ;
age = bl.Search().ToString();
address = bl.Search().ToString();
}
First, you create a
csBL
object, whatever the hell that is. CLASS, METHOD, AND VARIABLE NAMES ARE IMPORTANT! THEY GO A LONG WAY TOWARDS SELF DOCUMENTING CODE.
Next, you grab the values from three TextBox's, terribly named TextBox1, TextBox2 and TextBox3, by the way (see above), and then do nothing with those values. You simply throw those values away.
You then call a
Search
method three times, converting whatever it returns to a string and then storing whatever value that is in your three variables from above. You then throw those values away, doing nothign with them at all until the variables go out of scope and the content is lost.
You seem to be obsessed with n-tier architecture but you don't know the first thing about how to do the simplest management of your data and call methods. That seems very backwards to me.