473,320 Members | 1,969 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,320 software developers and data experts.

Direct link into calendar control

Hello,

This is driving me nuts! It's a bit hard to explain so please bare with me.

I have an ASP.NET page that uses the calendar control. I use DayRender
to set specific days selectable depending on data in a database. Works fine.

I want to be able to give a user a direct link that shows content for a
specified date - AND sets the calendar control to that date. I've done
this by making a direct link in the form http:/blabla/?day=2004-11-30.
This also works fine IF it is in the current month.

If, however, the link says http://blabla/?day=2004-10-10 (when we're in
november or december) the calendar doesn't work - it's stuck on
currentmonth.

When I receive an incoming request, I check for the "day" argument... e.g. :

------------
if(!this.IsPostBack)
{
if (Request.QueryString["day"] != null)
{
myDateTime = Convert.ToDateTime(Request.QueryString["day"]);

clndMenu.SelectedDate =
Convert.ToDateTime(myDateTime.ToString("yyyy-MM-dd"));

// Get content from database

------------

It leaves the calendar pointing to current month (December) - not the
month I asked for with SelectedDate. Is the DayRender event being called
before I get a chance to modify anything? What can I do if that is the case?

Note that if I load the page per default, select the month before now,
and click a date everything works fine (using the VisibleMonthChanged
and SelectionChanged events).

Hope that someone understands this and has a solution!

Thanks
Nov 18 '05 #1
0 944

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

Similar topics

5
by: Miguel Dias Moura | last post by:
Hello, i am trying to create a .css file with several styles and apply them to the calendar control so i can change the look of: 1. Text Type and Format (Bold, Underline, etc) 2. Background...
1
by: bill yeager | last post by:
I would like to place the currently selected date (retrieved from the database) on a calendar control which is embedded inside a datagrid. However, I can't find the ID of the control to do so....
4
by: Kurt Schroeder | last post by:
I am trying to add a link button to a calendar. this is a simple example: Private Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles...
3
by: thorpk | last post by:
I posted this problem earlier in the month and some one decided it was better to change the subject and ask a completely different question. I am therefore reposting. I am hoping some one can...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.