473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Repeater/No Data message -- How?

Hey all,

I have a repeater setup which pulls data from a SQL server. If there is
no data, I want to display a message "No Data". How can I do this?

Thanks in advance!

Chad
Nov 18 '05 #1
3 1584
I usually just have a label right above my repeater that I default to not
visible. Then, when I fill up the datatable that I am going to bind to the
repeater. I check the row count. If it's 0, I hide the repeater and show
the label that says there is no data.

HTH,
-Cliff

"Chad A. Beckner" <Ch*********@ProspectiveLink.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hey all,

I have a repeater setup which pulls data from a SQL server. If there is
no data, I want to display a message "No Data". How can I do this?

Thanks in advance!

Chad

Nov 18 '05 #2
I figured as much, that's what I just got done doing. So, you "can" or "can
not" add the label dynamically (at runtime) and then hide the repeater (in
essence, replacing it?)

Chad

"Cliff Harris" <he***@myrealbox.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I usually just have a label right above my repeater that I default to not
visible. Then, when I fill up the datatable that I am going to bind to the repeater. I check the row count. If it's 0, I hide the repeater and show
the label that says there is no data.

HTH,
-Cliff

"Chad A. Beckner" <Ch*********@ProspectiveLink.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hey all,

I have a repeater setup which pulls data from a SQL server. If there is no data, I want to display a message "No Data". How can I do this?

Thanks in advance!

Chad


Nov 18 '05 #3
I guess you could add the label dynamically... it's just a lot easier if I
don't have to worry about adding it to the page in the right place, etc. So
I just hide it. Hack? I don't think so, but, hey, that's me.

-Cliff

"Chad A. Beckner" <Ch*********@ProspectiveLink.com> wrote in message
news:Op****************@TK2MSFTNGP11.phx.gbl...
I figured as much, that's what I just got done doing. So, you "can" or "can not" add the label dynamically (at runtime) and then hide the repeater (in
essence, replacing it?)

Chad

"Cliff Harris" <he***@myrealbox.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I usually just have a label right above my repeater that I default to not
visible. Then, when I fill up the datatable that I am going to bind to the
repeater. I check the row count. If it's 0, I hide the repeater and show the label that says there is no data.

HTH,
-Cliff

"Chad A. Beckner" <Ch*********@ProspectiveLink.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hey all,

I have a repeater setup which pulls data from a SQL server. If

there is no data, I want to display a message "No Data". How can I do this?

Thanks in advance!

Chad



Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ed Allan | last post by:
http://ejaconsulting.com/nestedrepeater/NestedRepeater.txt >-----Original Message----- >Doh! The HTML has all been rendered . . . > >Right click on this link and select 'Save target as ..' >to...
2
by: Stephen Miller | last post by:
I am using the OnItemDataBound event of Repeater control to nest a DataGrid within the Repeater. When I attempt to bind to the DataGrid using the DataSource method I get the error message "Object...
5
by: Scott Lyon | last post by:
I am having a strange problem. The program is a bit complex, but I'll try to simplify what I can. I apologize if this is complicated, but I think this would still be simpler than posting a bunch of...
2
by: Stan | last post by:
I cannot make the link buttons fire ItemCommand from repeater control. Here is the code: <asp:repeater id=rptLetters runat="server"> <itemtemplate> <asp:linkbutton id="lnkLetter"...
2
by: Colin Nicholls | last post by:
Platform: ASP.NET 1.1 I have a repeater nested inside another repeater. My outer repeater is looping fine. I am manually binding the inner repeater to a DataReader obtained from another...
8
by: I am Sam | last post by:
Hi everyone, This problem is making me old. I don't want to get any older. I have a multi-nested repeater control as follows: <asp:Repeater ID="clubRep1" Runat="server">...
7
by: charliewest | last post by:
Hello - I'm using a Repeater control to render information in a very customized grid-like table. The Repeater control is binded to a DataSet with several records of information. Within the...
2
by: GD | last post by:
I'd like to use a Repeater to display data coming back from a cross-tab report. Because it's a cross-tab, I generally don't know how many columns are coming back. They do follow a certain format: ...
8
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the...
3
by: Emma Middlebrook | last post by:
Hi there, I've been trying to implement a repeater control in an ASP.NET 2 page but I can't seem to get the layout exactly how I want and I'm not sure if it's something that I am doing wrong or...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.