hello friends i vll be highly obliged to all ur kind people having crutial knowledge abt asp.net i would b so generous to all of u fr this kind helpHow can we manage calender control in asp.net?
Following code will help you to make calender control in asp.net
Protected Sub Calendar13_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEvent鈥?Handles Calendar13.DayRender
Dim nextDate As DateTime
Dim hl As HyperLink
Dim onmouseoverStyle As String = ';this.style.backgroundColor='#D4EDFF'';
Dim onmouseoutStyle As String = ';this.style.backgroundColor='@BackColor'鈥?br>
Dim rowBackColor As String = String.Empty
Dim notTouched As Boolean
notTouched = True
Try
If Not CType(Session(';dsHolidays';), DataSet) Is Nothing Then
For Each dr As DataRow In CType(Session(';dsHolidays';), DataSet).Tables(0).Rows
nextDate = CType(dr(';HolidayDate';), DateTime)
If nextDate = e.Day.Date Then
e.Cell.BackColor = System.Drawing.Color.Pink
e.Cell.ForeColor = System.Drawing.ColorTranslator.FromHtml(鈥?br>
notTouched = False
End If
Next
End If
If Not CType(Session(';dsRequests2';), DataSet) Is Nothing Then
For Each dr As DataRow In CType(Session(';dsRequests2';), DataSet).Tables(0).Rows
nextDate = CType(dr(';VacationDate';), DateTime)
If nextDate = e.Day.Date Then
hl = New HyperLink
hl.Text = CType(dr(';ToolTip';), String)
hl.NavigateUrl = ';Entry.aspx?ID='; %26amp; CType(dr(';VacationID';), String)
hl.BorderColor = Color.Gray
hl.BorderWidth = 1
hl.ToolTip = ';Click this item to get more detailed information.';
hl.Font.Name = ';Arial Narrow';
hl.Font.Bold = False
hl.ForeColor = System.Drawing.ColorTranslator.FromHtml(鈥?br>
e.Cell.BackColor = Color.Azure
e.Cell.Controls.Add(hl)
notTouched = False
End If
Next
End If
If notTouched And Not e.Day.IsWeekend Then
e.Cell.Attributes.Add(';onmouseover';, onmouseoverStyle)
e.Cell.Attributes.Add(';onmouseout';, onmouseoutStyle.Replace(';@BackColor';, rowBackColor))
End If
Catch ex As Exception
Response.Write(';Errors occurred: No RuleID / Hire Date specified for user! '; %26amp; ';Additional errors include: '; %26amp; ex.ToString())
End Try
End SubHow can we manage calender control in asp.net?
I can do it
you can live chat with me for this to get step by step guidance or full work
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment