473,770 Members | 1,994 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.IsPost Back)
{
if (Request.QueryS tring["day"] != null)
{
myDateTime = Convert.ToDateT ime(Request.Que ryString["day"]);

clndMenu.Select edDate =
Convert.ToDateT ime(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 VisibleMonthCha nged
and SelectionChange d events).

Hope that someone understands this and has a solution!

Thanks
Nov 18 '05 #1
0 985

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

Similar topics

5
4600
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 Color 3. Foreground Color 4. Border Tickness 5. Border Color
1
2160
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. During the "Edit" command of the grid, I have the following code: <code> If e.CommandName = "Edit" Then Dim myDatagridItem As DataGridItem Dim lblStartDate As Label Dim lblEndDate As Label
4
4531
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 Calendar1.DayRender If e.Day.Date = Now.Date Then Dim lbtntemp As New LinkButton lbtntemp.Text = "go here" lbtntemp.ID = "thsLnk" e.Cell.Controls.Add((lbtntemp)) End If
3
2742
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 assist with this. Thanks in advance. I have an access database that i have added a pop up calendar to, the Table information for the Date Reported field is Date/Time format short date, input mask is 00/00/0000.
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10259
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.