Web Design and Development Forums

Calender Control help (Possibly easy)

This is a discussion on "Calender Control help (Possibly easy)" within the ASP.NET Forum section. This forum, and the thread "Calender Control help (Possibly easy) are both part of the Program Your Website category.


Go Back   Webforumz.com > Program Your Website > ASP.NET Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Jan 30th, 2008, 21:06   #1 (permalink)
New Member
 
Join Date: Jan 2008
Location: uk
Age: 41
Posts: 1
Calender Control help (Possibly easy)

Ok heres a problem thats been bugging me for sometime, but magaed to put it off as I had other stuff to program.

I'm using a Callender control in ASP.NET to display some data from a SQL table.

My current code is
Code: Select all
<asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1"></asp:GridView>

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:default %>" SelectCommand="select message from myTable where day_date = @day_date">
<SelectParameters>
<asp:ControlParameter Name="day_date" Type="DateTime" ControlID="Calendar1" PropertyName="SelectedDate" />
</SelectParameters>
</asp:SqlDataSource>
Now this code works but I need it to work in weeks instead of days so to speak. So the data would show for 7 days instead of just that 1 day (for example Monday - Sunday). My only thoughts would be to make the database hold 7 rows of dates, however that may be impractical as other users may need to change the dates once in a while.
Can anyone think of an easy way to do this? Or am I going to need to use a hella of lot more code.

Any help would be appreciated.
Aspnoober is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Mar 7th, 2008, 00:04   #2 (permalink)
Junior Member
 
Join Date: Mar 2008
Location: Torquay, Devon, UK
Age: 23
Posts: 13
Re: Calender Control help (Possibly easy)

Unfortuntely the caledar control doesn't support a week-view like in, say, outlook?
One way around this would be to use a repeater or datalist to show data for the days of the current week (as calculated on the calendar) then set the currently selected calendar day as the selected datalist control.

Other than that, i can't think of anything.
There are a few third party Outlook style calendar controls, but i don't think any of them are freeware.

All the best:
Rob - Riviera Software
RSoftware is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Image Buttons - Using too much code possibly ?? slimboyfatz32 CSS Forum 5 Feb 6th, 2008 17:28
[SOLVED] File Upload Possibly Blocked longstand PHP Forum 2 Jan 31st, 2008 23:20
A couple of problems in IE7, Opera and possibly IE6 too? blizeH JavaScript Forum 3 Jun 19th, 2007 10:11
A couple of problems in IE7 (possibly IE6 too?) blizeH HTML Forum 4 Jun 15th, 2007 08:35
Calender Help Aaron1988 PHP Forum 4 Mar 18th, 2007 23:57



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 21:54.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59