How to highlight today’s date in Calendar Control in different color
In Calendar DayRender Event VB.NET If e.Day.IsToday Then e.Cell.ForeColor = Color.Blue e.Cell.BackColor = Color.Pink End If C# if (e.Day.IsToday) { e.Cell.ForeColor = Color.Blue; e.Cell.BackColor = Color.Pink; }
How to hide ‘other months’ in a Calendar Control
In the Calendar DayRender Event VB.NET If e.Day.IsOtherMonth = True Then e.Cell.Text = ” End If C# if (e.Day.IsOtherMonth = true) { e.Cell.Text = ”; }
How to hide the WeekDay Header in the Calendar control
In the Calendar PreRender Event VB.NET Calendar1.ShowDayHeader = False C# Calendar1.ShowDayHeader = false;
How to clear a DataGrid
VB.NET DataGrid1.DataSource = Nothing DataGrid1.DataBind() C# DataGrid1.DataSource = null; DataGrid1.DataBind();
How to open a new window without IE menus and toolbars on click of a button
VB.NET Button2 .Attributes.Add (‘onclick’, ‘window.open(’webform1.aspx’,’_blank’,’toolbar=no’)’) C# Button2 .Attributes.Add (‘onclick’, ‘window.open(’webform1.aspx’,’_blank’,’toolbar=no’)’);