I have an unordered list on my ASP VBScript page. Basically, I want to do this:
IF record set is not empty THEN
show News button
ELSE
do not show News button
I want the News button to display as a list item.
I have code working to check if a record set is empty or not and I'm using Response.Write, which is probably a problem.
Is this possible? Can/should I use something other than Response.Write?
IF record set is not empty THEN
show News button
ELSE
do not show News button
I want the News button to display as a list item.
I have code working to check if a record set is empty or not and I'm using Response.Write, which is probably a problem.
Code:
<% If (rsNews.EOF=False) Then
Response.Write("<li><a href="newspage.asp?Dir_ID=<%=(rsDirectory.Fields.Item("Dir_ID").Value)%>">News</a></li>")
%>
<% End If %>
Is this possible? Can/should I use something other than Response.Write?
Comment