473,654 Members | 3,082 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cant add events to HTML controls in a Calander control

Im not getting any error messages but the event is not going off when
i click the button it just posts back to the same page. I know this
code has worked outside of Calanders with the same code. Anyone have
any ideas?

While rdz.Read()
lb(rdz("id")) = New Button
lb(rdz("id")).I D = "lb" & rdz("id")
lb(rdz("id")).T ext = rdz("lloyds_num ")
AddHandler lb(rdz("id")).C lick, AddressOf dayclickz
ctlCell.Control s.Add(lb(rdz("i d")))
End While

<asp:Calendar OnDayRender="Ca lendar_RenderDa y" id="myCal"
SelectionMode=" None" Runat="server" />
Nov 17 '05 #1
3 3855
Hello Michael,

Thanks very much for posting here.

Based on my understanding, now the question is: You added some controls to calendar control in DayRender event. Now
you wanted to know how to add event handlers to these added controls. Please let me know if I have misunderstood the
question.

Since the DayRender event is raised while the Calendar control is being rendered, you cannot add a control that can also
raise an event, such as LinkButton. You can only add static controls, such as System.Web.UI.L iteralControl, Label, Image,
and HyperLink. This is a limitation of Calendar control. This is documented in the Remarks section in the help of
Calendar.DayRen der Event.

If you have any more concerns on it, please post here. Thanks.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!From: mc****@aol.com (Michael Evanchik)
!Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
!Subject: Cant add events to HTML controls in a Calander control
!Date: 29 Jul 2003 11:16:51 -0700
!Organization: http://groups.google.com/
!Lines: 15
!Message-ID: <73************ **************@ posting.google. com>
!NNTP-Posting-Host: 216.66.24.116
!Content-Type: text/plain; charset=ISO-8859-1
!Content-Transfer-Encoding: 8bit
!X-Trace: posting.google. com 1059502612 21298 127.0.0.1 (29 Jul 2003 18:16:52 GMT)
!X-Complaints-To: gr**********@go ogle.com
!NNTP-Posting-Date: 29 Jul 2003 18:16:52 GMT
!Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!new sfeed00.sul.t-online.de!t-online.de!news-spur1.maxwell.s yr.edu!
news.maxwell.sy r.edu!sn-xit-03!sn-xit-01!sn-xit-09!supernews.co m!postnews1.goo gle.com!not-for-mail
!Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1630 73
!X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
!
!Im not getting any error messages but the event is not going off when
!i click the button it just posts back to the same page. I know this
!code has worked outside of Calanders with the same code. Anyone have
!any ideas?
!
! While rdz.Read()
! lb(rdz("id")) = New Button
! lb(rdz("id")).I D = "lb" & rdz("id")
! lb(rdz("id")).T ext = rdz("lloyds_num ")
! AddHandler lb(rdz("id")).C lick, AddressOf dayclickz
! ctlCell.Control s.Add(lb(rdz("i d")))
! End While
!
!<asp:Calendar OnDayRender="Ca lendar_RenderDa y" id="myCal"
!SelectionMode= "None" Runat="server" />
!
Nov 17 '05 #2
nope you hit on on the "button", unfortunate

Thanks
Nov 17 '05 #3
Hello Michael,

Please post here if you have any follow up questions.

Besides, regarding adding more functionality to calendars, try this:

Normally you have to click the text inside the cell. With this calendar you can click anywhere within the cell.

Private Sub Calendar1_DayRe nder(ByVal sender As Object, ByVal e As
System.Web.UI.W ebControls.DayR enderEventArgs) Handles Calendar1.DayRe nder
e.Cell.Attribut es.Item("onclic k") = "javascript:__d oPostBack('Cale ndar1','" & DateDiff(DateIn terval.Day, #1/1/2000#,
e.Day.Date) & "');"
End Sub

Thanks.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!From: mc****@aol.com (Michael Evanchik)
!Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
!Subject: Re: Cant add events to HTML controls in a Calander control
!Date: 31 Jul 2003 08:35:14 -0700
!Organization: http://groups.google.com/
!Lines: 3
!Message-ID: <73************ **************@ posting.google. com>
!References: <73************ **************@ posting.google. com> <wY************ **@cpmsftngxa06 .phx.gbl>
!NNTP-Posting-Host: 24.44.204.68
!Content-Type: text/plain; charset=ISO-8859-1
!Content-Transfer-Encoding: 8bit
!X-Trace: posting.google. com 1059665715 23827 127.0.0.1 (31 Jul 2003 15:35:15 GMT)
!X-Complaints-To: gr**********@go ogle.com
!NNTP-Posting-Date: 31 Jul 2003 15:35:15 GMT
!Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!new sfeed00.sul.t-online.de!t-online.de!news-spur1.maxwell.s yr.edu!
news.maxwell.sy r.edu!sn-xit-03!sn-xit-01!sn-xit-09!supernews.co m!postnews1.goo gle.com!not-for-mail
!Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1638 09
!X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
!
!nope you hit on on the "button", unfortunate
!
!Thanks
!
Nov 17 '05 #4

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

Similar topics

4
2552
by: blue | last post by:
I have a drop-down list, a radio button list and a submit button. I'm adding these controls to a table and I'm adding the table to a Placeholder. I'm adding it to the Placeholder because I don't know exactly where the table will be located on the page until runtime. Before the form control table is added to the Placeholder, I'm adding a whole bunch of tables to the Placeholder. This is a flowchart program and I have multiple action boxes...
5
1635
by: Patrick | last post by:
Hello I have the following problem. I have an aspx Page. This page contains an ASP-Table Object. So in that table, I have a linkbutton. So, I can't edit the event of that button trough the WYSIWYG editor, so I co to the CodeBehind and add the Event in the InitializeComponent() Method like this this.lbTest.Click += new System.EventHandler(this.lbTest_Click); so far, all works fine. now if i go to the WYSIWYG editor, add another...
2
4331
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control displaying the contents of the data source, whilst another control updates the datasource via a command buttons implementation of 'Click', an event raised in the 'Handle Postback Events' stage of the control execution life cycle (via the...
4
1747
by: thomson | last post by:
Hi all, i do have a user control with 4 buttons, and all the events are firing properly, My problem is that i need to right an event handler in the user control, which gets fired after a specific process is done,, but the form which will host the user control has to specify what has to be done Something like this , if the event is fired it should call the event in
12
2785
by: scsharma | last post by:
Hi, I am working on creating a webapplication and my design calls for creating main webform which will have menu bar on left hand side and a IFrame which will contain all the forms that are shown when menu items are clicked.Besides these i would like to put a custom status bar. Any error message encountered in any of the webpage will be displayed in the banner. The problem iam encountering is how to access the customer status bar in child...
5
1729
by: snesbit | last post by:
If a screen is made up of several user controls and those user controls contain various packaged or standard controls such as a grid, how do you raise both standard and custom events from the user control so the form containing the user control can see the events you want them to see. Help Please....
0
2485
by: jonathan.beckett | last post by:
I have been working on a client project recently that is using winforms ..NET user controls within web pages in Internet Explorer, and need to find out how to make the user control communicate back to the webpage (typically to tell it that it has finished doing something). I started digging around and found out that I needed to implement a COM interface for the .NET user control, and pick up the events from that in Javascript on the...
7
1866
by: Jassim Rahma | last post by:
is there any way to steel the outlook calander control and use in my windows for application?
1
4895
by: swethak | last post by:
Hi, I am desiging the calendar application for that purpose i used the below code. But it is for only displys calendar. And also i want to add the events to calendar. In that code displys the events when click on that date that perticular event displyed in a text box.But my requirement is to when click on that date that related event displyed in same td row not the text box. and also i add the events to that calendar.plz advice how to...
0
8372
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8814
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
8706
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
8475
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,...
0
5621
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
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2709
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
1
1915
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1592
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.