Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #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.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 02:05 AM.

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