I want to hide a button on a page if my gridview has rows...
I can't seem to get it right as once the button disappears it won't appear again if the gridview has rows.
I just want to show the button if there are 0 rows and hide the button if there are rows.
Protected Sub gvGenQuestionnaire_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles gvGenQuestionnaire.RowDataBound
If gvGenQuestionnaire.Rows.Count = 0 Then btnViewGenQuest.Visible = True
If gvGenQuestionnaire.Rows.Count > 0 Then btnViewGenQuest.Visible = False