Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking 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 Basics 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 November 25th, 2007, 06:25 PM
Registered User
 
Join Date: Nov 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help Grid View Drop Down List, view all

 Hello everyone. Just started learning ASP.NET 2.0 and I am loving it so far. Here is something I am trying to accomplish but can't seem to figure it out, maybe one of you will have an idea of how I can do this.

 I have three Drop Down Lists: Year, Month, Day. These drop downs, all have the auto postback feature enabled. I have a database with the columns Year Month Day, sample data from each filed would be 2007, 10, 25. My gridview currently takes the selection of all three boxes and displays all corresponding records that match the criteria.


What I want to be able to do though, is add a View All in the top of each of my drop down lists. This way I can select, Year: 2007, Month: 10, Day: View All and my gridview would return all records with the year 2007, the month 10, and any day value. It currently displays no records if any one of the three values I have specified are Null. Then if I wanted to I could change the day value to a number and it would still function the same. Here is the SQL statement I am using right now. Is there a value I can put in there that selects everything?

SELECT [UserName], [Year], [Month], [Day], [Time], [ComputerName] FROM [UserLogon] WHERE (([Year] = ?) AND ([Month] = ?) AND ([Day] = ?))


Maybe I am going about this wrong, if someone could point me in the right direction that would be great.





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
bulleted list in grid view MunishBhatia ASP.NET 2.0 Basics 2 December 24th, 2007 04:26 AM
grid view komalpriya .NET Framework 2.0 3 November 7th, 2007 10:34 AM
populate details view or list view non empty rows iinfoque ASP.NET 2.0 Basics 0 March 11th, 2007 06:11 AM
having some fields of a grid view a drop list dsblack@montgomerycountyt ASP.NET 2.0 Professional 0 June 2nd, 2006 04:18 PM





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