Raise Event when a selected date is selected again in Calendar

Hi all,

When I view source of the rendered page that contains a calendar control, I see it's a table, with a child table where each date is a table cell calling the all powerful __dopostback function with the calendar id as the event target and a unique numeric string as the event argument.

Since the selected date is also containing the dopostback function, could that be exploited to call a routine during page load due to postback.

I have come upto this and got stuck after that.

'aspx.vb code snippet:

If TypeOf sender Is Control Then
     dim ctl as control
            ctl = sender
     If ctl.ClientID = "calTest" 'calTest is ID of the calendar

  'What do I do now to check if the selected date has been selected again?


End If


Thanks in advance


aspnetdev2000
0
aspnetdev2000
9/7/2006 8:14:05 AM
asp.net.web-forms 93655 articles. 6 followers. Follow

3 Replies
895 Views

Similar Articles

[PageSpeed] 45

Hi,aspnetdev2000:

You can set the selectedDate into a viewstate or a session. In the selectionChanged event , you can check it out whether the new selectedDate is in the session or viewstate.




Best Regards,
__________________________________________________
Sincerely,
Rex Lin
Microsoft Online Community Support

This posting is provided "AS IS" with on warranties, and confers no rights.
0
rexlin
9/8/2006 7:21:48 AM

Hi rexlin,

I want to run a sub-routine when there is no change in the selection. This happens when the user clicks again on the selected date.

I have noticed that there is a dopostback when the selected date is clicked again.

So, even though it won't raise a selectionchanged event, it would still postback.

I want to know, what could be done to trap that event. Is it dayrender or something? I am still searching.

Thanks in advance.


aspnetdev2000
0
aspnetdev2000
9/8/2006 9:01:35 AM

Yes, if you select the selected date again ,the selectionchanged event will not fire.

May you can do it in the Calendar_Load or DayRender event.




Best Regards,
__________________________________________________
Sincerely,
Rex Lin
Microsoft Online Community Support

This posting is provided "AS IS" with on warranties, and confers no rights.
0
rexlin
9/8/2006 9:31:04 AM
Reply:

Similar Artilces:

Need help finding a .net Calendar tool with event list for a selected date
Hi there, I'm looking for an out-of-the box .net tool for displaying a calendar in an aspx page and be able to see a list of events for a selected(clicked) date next to the calendar or in a sperate window. It should have an admin tool to add and edit events. The closest one I have found is http://www.agdstudio.com/calendar_demo/example1.aspx But it doesn't have the search feature to search within the events. Can anyone point me to a good website or resource? Thanks in advance, K. Try this link  look the same to me but his code is free.  Hope this helps http://developer.swa...

Selecting already selected date in Calendar control
Greetings,  I have a calendar control inside an UpdatePanel. As indicated in the documentation (and verified by testing), the SelectionChanged event is triggered only if the selected date is changed. That is, it does not trigger if the user clicks on the already selected date.  However, clicking on the already selected date does cause an async postback of the UpdatePanel that contains the calendar.  So, my question -- how can I determine that the cause of the postback was the user clicking a second time on the calendar control? There does not appear to be a ...

SELECT from SELECT
Hi! I remember seeing an example where you can do a select from a nested select, but I cannot seem to make it work. So it would be something like this: select max( name ) from ( select name from customer union select name from vendor ) Was I dreaming I saw that? Thanks! D In article <4500243f@forums-2-dub>, daniel_AT_infrontsoftware_DOT_com@N0SPAM.com says... > Hi! > > I remember seeing an example where you can do a select from a nested > select, but I cannot seem to make it work. No, you weren't. Try (UNTESTED!) adding a...

How to use Select case statement to select web form controls
Hi; I don't know why I can't conceptionalize  this but I want to take these if statements and put them in a select case. I am testing for multiple selection from several DDLs on my web form.   If DropDownList1.SelectedIndex > -1 And DropDownList2.SelectedIndex > 0 Then If Me.CheckBox1.Checked Then ObjectDataSource1.FilterExpression = "assignee = {0} AND assignor = {1}" Else ObjectDataSource5.FilterExpression = "assignee = {0} AND assignor = {1}" End If End If If DropDownList1.SelectedIndex > -1 And DropDownList3.SelectedIndex >...

Calendar Select does not select a date if datetime value contains a time other than midnight
If you set a Calendar control SelectedDate with a DateTime where the there is a date part, and a time of 00:00:00, the calendar correctly selects that dateIf the time part is not midnight, the Calendar does not select the date.I used the DateTime.Date value to set the date from a DateTime value with non-midnight datesIs this a bug? or by quirky designIf it was easy, everybody would be doing it. I could be wrong but more like quicky design because past midnight is in the 24hour clock which is in TimeSpan.http://msdn2.microsoft.com/en-us/library/system.timespan.aspxKind regards,Gift Peddie ...

How can I have the selected month came up by default in the Calendar control if a date is selected?
I am using .net 1.1.  I set a default date to a Calendar control, for example Calendar1.SelectedDate = "10/1/2007" when the page was loaded.  When the Calendar came up, the current month was shown.  I clicked the previous arrow to October and 10/1/2007 was selected. How can I have the October (or the selected month) came up by default?  Thanks. DanYeung I figured it out.  Set Calendar1.VisibleDate = "10/1/2007". DanYeung...

Forms , Select and option selected.
Name: Jirrick Email: jurahudecatgmaildotcom Product: Firefox Release Candidate Summary: Forms , Select and option selected. Comments: I've found problem with SELECTED option in <select> forms. I wanted to use pre-selected option in my form , but when I used the Firefox 3 RC1 to render it there wasn't any preselected item. I tried to rewrite code ( use selected="selected" ) , but still no effect. I was confused and tried to use others viewers ( IE 8 , OP 9 , Konqueror ) and the pre-selected item worked well in these browsers. The bug has to be in FF 3 ...

Can you please help..Calendar Didn't select the Date I want it selected..
Here is my code, in Page_load , find out what the week the day is and then set the Calendar's Start Time as last Monday and End Time as last Sunday.. these code didn't works on page_load.. but I don't know what's going wrong.. can you please help me to correct my code?1 private void Page_Load(object sender, System.EventArgs e) 2 { 3 // 4 if(!Page.IsPostBack) 5 { 6 string todayWeek = DateTime.Now.DayOfWeek.ToString(); 7 switch(todayWeek) 8 { 9 case "Monday": 10 catchDate(-7,-1); 11 b...

Display Selected Dates in .NET Calendar Control..HELP!
Okay, I am a newbie to ASP.net, so hang with me here! I need to create a data-driven calendar using the ASP.net calendar control and an existing Oracle database. I followed the MSDN "How to" ( http://msdn2.microsoft.com/en-us/library/ms228044(VS.80).aspx ) utilizing the SQL database without a problem; however, once I recode to use my Oracle connection string and database, I receive an ArgumentException that says "Keyword not supported: 'Unicode'." at the connection string variable. I have imported the System.Data. & System.Data.SqlClient namespaces, but now I'm wonder...

Selecting non continuous dates in the .net calendar control
Is there a way to select non continuous dates using the calendar control. I know you can select a single date, entire week, or entire month, but I want to give my user the ability to select non continuous dates like July 1, July 10, July 25, July 26, and July 27 and then submit that to the server. Any ideas?...

Using a calendar control popup to select a date to fill in on a form
Can anyone give me some tips, or point me to sample code illustrating how to put a calendar link next to a textbox that when clicked displays a calendar control and when a date is selected pops the selected date back into the textbox? Adding a calendar directly into the form looks horrible but allowing users to add dates on their own is not acceptable either due to international date formats, etc.TIAKevin Maybe something like this will help:http://geekswithblogs.net/aferrandiz/archive/2004/11/14/14986.aspx-- Regards,Luis Abreuemail: labreu_at_gmail.comEN blog:http://msmvps.com/blogs/luisab...

Why is the select saying selected after an item is selected?
This was a whitelisting issue due to a software upgrade at hostgator..  Nothing wrong with my code..Scot King SEO Software Tool | Search Engine Optimization"Get your page rank high"  huh? It is smart to put your question in the body and not just in the title. Have no idea what your question is or if it even a question.Eric Pascarello.com | Twitter epascarello | LinkedIn use thisddl.options[ddl.selectedIndex].selected = false; //Clear the selection ddl.options[1].selected = trueMAKMark as Answer if this reply helps youMVP ASP/ASP.NetASP.Net Hosting : Host DepotMy Sit...

Load Text box of one web form with selected list item of list box of another web form
one help please Problem is i have two web forms  1.  ForiegnkeyTest.aspx  2. foroginkeytable.aspx   step 1 1 ForiegnkeyTest.aspx one web form <head runat="server"><script language="javascript" type="text/javascript">   function popWin()   {         var confirmWin = null;      confirmWin = window.open('foroginkeytable.aspx','anycontent',   'width=455,height=435,status');   }  </script> &...

Form: Focus on selected values in dropdownlists, Refresh after selection and hidding formfields based on selection.
Hello again,I have a form with several dropdown lists. Depending on the selected value in the dropdown lists other fields become available in that same form. It is working in classic ASP in combination of JavaScript. I want to migrate it to ASP.NET. I have posted a part of the form at the end of this post.My questions:1. I use <option <%If iFood="0" then%>selected<%End If%> value="0">No value selected</OPTION> to select the selected item when the form is reloaded after the selecting. I know that this also works in ASP.NET, but isn't there a typical ASP....

Web resources about - Raise Event when a selected date is selected again in Calendar - asp.net.web-forms

Portal:Law/Nominate/Selected article - Wikipedia, the free encyclopedia
Add the article in to a subpage of this portal, such as Portal:Law/Selected article/# , replacing the "#" with the number above the current highest. ...

F8: Facebook’s FbStart Initiative Will Give Selected Developers A $30K Kick-Start
... successful applications is likely a whole lot easier with $30,000 in free tools and services to start off with, and that’s exactly what selected ...

LEGO Shop - The LEGO Technic team has selected the winner... - Facebook
The LEGO Technic team has selected the winner of the Co-Creation Challenge! LEGO will be producing a limited run of 20,000 of this stunning set.... ...

baby365- Grand Doctor Ma Selected Students for iPad on the iTunes App Store
Get baby365- Grand Doctor Ma Selected Students on the App Store. See screenshots and ratings, and read customer reviews.

Selected Cheney Vice Presidential Photographs
... for photos found within these albums are Paul Morse, Karen Ballard, Kimberlee Hewitt, Shealah Craighead, and Chris Greenberg. These selected ...

[iOS Advice] How To Clarify Your Email Replies By Quoting Selected Text - YouTube
Follow me on Twitter: http://www.twitter.com/macmixing Like my Facebook page: http://www.facebook.com/macmixing RATE, COMMENT, SUBSCRIBE! :-) ...

Local farmers to sell their fresh dates at selected supermarkets
Fresh dates will be on sale this summer under the label of Local Harvest at selected supermarkets and Spinney's.

Animal of the Day: Lucius Has Been Selected as the U.K.’s ‘Happiest Cat’
He’s got one blue eye, one green eye and a heart of gold. British mobile phone company O2 recently held some “cat auditions” to find “the UK’s ...

Michael Sam becomes first openly gay player selected in an NFL Draft
Defensive end Michael Sam of the University of Missouri became the first openly gay player to be selected in a National Football League Draft ...

Artist facing child pornography charges selected for MCA exhibition
An artist facing child pornography charges has been selected to show work in a prestigious exhibition at the Museum of Contemporary Art Australia. ...

Resources last updated: 12/27/2015 10:06:07 AM