Hi
I use below code in SP to count row of table and show it in label
ALTER procedure [dbo].[showMessage]
as
begin
SET NOCOUNT ON
select (select COUNT(id) from Message) as Message
,(select COUNT(id) from MessageM) as Messagem
end
AND BEhind Code
SqlCommand _cmd = new SqlCommand("showMessage", _cn);
_cmd.CommandType = CommandType.StoredProcedure;
_cn.Open();
SqlDataReader _dr = _cmd.ExecuteReader();
while (_dr.Read())
{
LblNRM.Text = _dr["Message"].ToString();
LblRM.Text = _dr["MessageM"].ToString();
}
_cn.close()
Now I want define other label that shows total of these two table rows
I mean if in Message Table has 7 row and MessageM tabel has 8 row so
LblNMR =7 and LblRM =8
Now I want define LBLMAIN that in this label show LBLMAIN=15 total of 2 tabel Rows
How I can do it ?
Thanks alot