Solved

How to display a notice when there is nothing to display

Posted on 2006-10-25
4
239 Views
Last Modified: 2010-04-25
Hi Experts

I have created a site that uses data within an Access database and everything is working just fine.

But something that ran across my mind (I really must get out more) is what happens if there isn't any data to display? How would I inform the user that there are no records to display?

I would like to put something along the lines of "Sorry. There are no records that meet your request".

How would I do this?

Many thanks in advance.

Regards

Martin
0
Comment
Question by:Martin Cotterill
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 17806509
Hi Martin,

This is what the Show Region server behavior is used for.  Simply write whatever text you want to display if there is no data and highlight it.  Then go to the Applications Panel, Server Behaviors tab, and add Show Region -> If recordset is empty.

You should also select all other text on the page that should display if there IS data and use the Show Region -> If recordset is not empty on it.  This way, the page will hide all of the "normal" text when there is no data.
0
 
LVL 1

Author Comment

by:Martin Cotterill
ID: 17807786
Excellent J!

Works perfectly!

Many thanks!

Regards

Martin
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 17808115
Thanks Martin,

You should also examine the code the DW uses to create these "Show If" regions.  It's very simple and once you get the hang of it, you can use the same or similar syntax to create more complicated conditional regions.  I use this trick to show or hide areas based on certain values in the record being viewed, set CSS options based on database values, and more.  
0
 
LVL 1

Author Comment

by:Martin Cotterill
ID: 17808156
Thanks for the tip J, I'll certainly do that.

Martin
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Can't get  my Web page's sublist  to display on Ipad or Iphone 8 689
Lock Form Controls 3 315
frames top frame repeats 4 142
drop down button disappears 12 112
For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question