Is there any way to check if a gridview is blank or if an accessdatasource doesn't display any info?
I know there is the EmptyDataText option in the gridview controls, but the problem with this is that I don't know how to make it not display if the user is logged in.
I tried doing something like this:
But that doesn't seem to actually make a change to the EmptyDataText.
If Session("username") = "" Then
loggedIn.Text = "Please log in to see user profile"
GridView1.EmptyDataText = ""
If Not Session("username") = "" Then
loggedIn2.Text = "User Info"
loggedIn3.Text = "Recent Orders"