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:
Code:
<%
If Session("username") = "" Then
loggedIn.Text = "Please log in to see user profile"
GridView1.EmptyDataText = ""
End If
If Not Session("username") = "" Then
loggedIn2.Text = "User Info"
loggedIn3.Text = "Recent Orders"
End If
%>
But that doesn't seem to actually make a change to the EmptyDataText.