Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 11th, 2007, 10:12 PM
Friend of Wrox
 
Join Date: Aug 2006
Location: Bangalore, Karnataka, India.
Posts: 231
Thanks: 0
Thanked 1 Time in 1 Post
Default sql datasource with grid view

hello
i used sqldatasource with grid view.for this i drop gridview control on my .aspx page and by smart tag i complete all steps and display data in grid view.
My question is if Select query did not fetch any records, how to display the message "No Records Found"
As i am not coding for it and sql query is inside sqldatasource control in .aspx page.


thanks......
__________________
thanks......
  #2 (permalink)  
Old December 12th, 2007, 02:25 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I don't want to sound unfriendly, but maybe this question is better suited for the Beginning ASP.NET 2.0 forum?

A GridView has an EmptyDataText property that shows up in the Property Grid.

Alternatively, if you need more control, you can use the <EmptyDataTemplate /> that shows up as an element between the GridView tags.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
  #3 (permalink)  
Old December 13th, 2007, 01:13 AM
Friend of Wrox
 
Join Date: Aug 2006
Location: Bangalore, Karnataka, India.
Posts: 231
Thanks: 0
Thanked 1 Time in 1 Post
Default

well okay i will consider this next time.

thanks......


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grid view roopeshmkatlive.in ASP.NET 1.0 and 1.1 Professional 1 August 1st, 2008 01:03 PM
Help Grid View Drop Down List, view all jskinner123 ASP.NET 2.0 Basics 0 November 25th, 2007 06:25 PM
grid view komalpriya .NET Framework 2.0 3 November 7th, 2007 10:34 AM
grid view MunishBhatia ASP.NET 2.0 Professional 2 June 5th, 2007 12:15 AM
Details View without Datasource harshaghanta ASP.NET 2.0 Professional 0 November 20th, 2006 09:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.