using System.Collections.Generic;
using System.Web.UI.WebControls;
public partial class Phonebook : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
protected void Button1_Click(object sender, EventArgs e)
if (TextBox_FirstName.Text == "")
message += "Please enter first name.";
string firstname = TextBox_FirstName.Text;
if (TextBox_LastName.Text == String.Empty)
message += "Please enter last name.";
string lastname = TextBox_LastName.Text;
Label_Result.Text = result;
csAddressbook obj = new csAddressbook();
obj.FirstName = TextBox_FirstName.Text;
obj.LastName = TextBox_LastName.Text;