How to display Message when Dataset is Null

Discussion in 'ASP .Net' started by Duppypog, Jun 27, 2003.

  1. Duppypog

    Duppypog Guest

    I have an asp.net page using a repeater control to display a dataset. When
    the dataset returned is null (no records matched the criteria) I want to
    display a message to the effect "No matching records found". I can't figure
    out how to do this.

    Any help is greatly appreciated,
    Lynnette
    Duppypog, Jun 27, 2003
    #1
    1. Advertising

  2. Duppypog

    Jay Pondy Guest

    Add a DIV tag as HTMLGeneric with runat set to server. Before you bind to
    the repeater check to see if the dataset is empty. If it is turn on the DIV
    tags display property and turn off the repeater.

    "Duppypog" <> wrote in message
    news:%23f$...
    > I have an asp.net page using a repeater control to display a dataset.

    When
    > the dataset returned is null (no records matched the criteria) I want to
    > display a message to the effect "No matching records found". I can't

    figure
    > out how to do this.
    >
    > Any help is greatly appreciated,
    > Lynnette
    >
    >
    Jay Pondy, Jun 28, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nedu N
    Replies:
    1
    Views:
    1,790
    Chris Taylor
    Oct 31, 2003
  2. JimO

    DataSet and dataSet

    JimO, Mar 1, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    517
    Mary Chipman [MSFT]
    Mar 8, 2006
  3. Joseph D. DeJohn

    DataSet to DataSet

    Joseph D. DeJohn, Aug 4, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    394
  4. Replies:
    5
    Views:
    26,595
    Mike Schilling
    Mar 29, 2006
  5. Mufasa
    Replies:
    6
    Views:
    886
    Scott M.
    Jul 27, 2007
Loading...

Share This Page