472,958 Members | 2,562 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

HELP!! calendar within a usercontrol....


I have a calendar control within a usercontrol. The calendar is to be used
on serveral pages of a web site - hence the use of a usercontrol.

I now wish to grab the value of Calendar_SelectionChanged and display in a
label on the main aspx page.

I thought I would be able to do this by having a Public Property within the
code behind for the usercontrol as follows :

Public Property ConcertDate() As String


Return calConcerts.SelectedDate.ToString("dd/MM/yyyy")

End Get

Set(ByVal Value As String)

End Set

End Property

Then within the code behind for the main page I would have the follwoing key
lines of code :

Protected WithEvents ctrlCalendar As MyCalendarUserControl ' declare the

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init

'CODEGEN: This method call is required by the Web Form Designer

'Do not modify it using the code editor.


' get a reference to the ctrlCalendar user control.

ctrlCalendar = DirectCast(FindControl("ctrlCalendar"),

End Sub

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

'Put user code to initialize the page here

lblConcertDate.Text = "Concert Date : " & ctrlCalendar.ConcertDate

End Sub

When I do this the selected date updates to the correct date following 2
clicks - it is one click behind!

I've read I may need to use event bubbling but being a beginner I do not
know whether this is the right way to go.

Please help.

Jul 21 '05 #1
0 970

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

Similar topics

by: addi | last post by:
All, I will be eternally greatful if someone can provide snippet of code, URL or reference material that shows how to display data in a "n colums * n rows" format. I am new to ASP and have...
by: Nicole - ASP/C# Beginner | last post by:
I am trying to kick off an custom event in a usercontrol that the webpage will listen and preform some actions if the event is fired from within my usercontrol
by: Mihaela Barbu via DotNetMonster.com | last post by:
I added the HelpButton on a form that contains UserControls and it just doesn't work. If I go with the mouse cursor over a windows form control (button, listView, etc) everything works just fain....
by: ann | last post by:
is there someway to disable the Other Months day(the previous and next months days) s from appearing? If so, can you let me know how? Thanks so much for your help!
by: Mark Friedman | last post by:
Does anyone know how to reference a subcontrol of a UserControl within client-side script. For example, if I have a TextBox as one of the elements of my UserControl with an id of "MyTextBox", how...
by: Nigel | last post by:
I successfully create a .NET Component (Visual Basic .NET) that would print, unfortunately when used within a web browser it appears that .NET security doesn't allow you to run code that interacts...
by: Gamze | last post by:
Hi, I have a calendar control within a usercontrol. The calendar is to be used on serveral pages of a web site - hence the use of a usercontrol. I now wish to grab the value of...
by: BenRatcliffe | last post by:
Hi there, Has anyone got any idea how i can use details in entered into a form (and stored in a tale) to create a meeting in the outlook calendar. I have tried linking the calendar to the database...
by: phpmel | last post by:
Hi guys, I have an asp calendar control, text box, calendar icon, eraser icon all within an update panel. The calendar works fine, postbacks are handled without the flickering of the screen etc....
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.