protected void Button1_Click(object sender, EventArgs e) { AuthorModel author = new AuthorModel(TextBox1.Text, TextBox2.Text); Response.Write(AuthorBLL.AddAuthor(author)); Label1.Text = AuthorBLL.GetAuthorCount().ToString(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Label1.Text = AuthorBLL.GetAuthorCount().ToString(); Label2.Text = PublisherBLL.GetPublisherCount().ToString(); } }