I have the following code on the Page_Load event of my page:
This works fine if the number is greater than 0, however if the count comes back as 0 I get the error
How can I hide/disable the label if the count is 0?
Thanks for any help
Code:
Dim dvUnreadMailCount As Data.DataView = GetUnreadMailCount.Select(DataSourceSelectArguments.Empty)
Me.lblUnreadMailCount.Text = dvUnreadMailCount.ToTable.Rows(0)("Number_of_Unread_Emails")
This works fine if the number is greater than 0, however if the count comes back as 0 I get the error
Code:
There is no row at position 0
How can I hide/disable the label if the count is 0?
Thanks for any help