Hey All,
I have calendar control inside Panel and based on number of weeks in month I want to change height and width of Panel at runtime
<asp:Panel ID="Pnl1" runat=server BackImageUrl="cal.jpg">
<asp:Panel runat="server" ID="PnlCalender" CssClass="MainCalenderin" BackColor="white">
<asp:UpdatePanel ID="UpdatePanel1" runat="server" >
<ContentTemplate>
<asp:Calendar ID="Calendar1" runat="server" BackColor="White" OnDayRender="CalendarDRender" Caption="<strong>ISEN Calendar</strong>" TitleStyle-BackColor=white SelectedDayStyle-ForeColor=black CellPadding="2" CellSpacing=1 OnSelectionChanged="Calendar1_SelectionChanged" SelectedDayStyle-BackColor="White" TitleStyle-Font-Bold=true BorderColor=white OnVisibleMonthChanged="Calendar1_VisibleMonthChanged">
<SelectedDayStyle BackColor="White" ForeColor="Black" />
<TitleStyle BackColor="White" Font-Bold="True" />
</asp:Calendar>
</ContentTemplate>
</asp:UpdatePanel>
<table align=center>
<tr>
<td>
<img src="1.gif"/> <span>1</span>
</td>
<td>
<img src="2.gif"/> <span>2</span>
</td>
<td>
<img src="3.gif"/> <span>3</span>
</td>
</tr>
</table>
</asp:Panel>
</asp:Panel>
<cc1:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" TargetControlID="PnlCalender" Corners="All" Radius="12" BorderColor=gray/>
When Calendar loads for first time for this month below mentioned code works and height & width becomes 250 by 250 and I am calling same code on Calendar1.visiblemonthchanged event but it does not working which means height & width remains same 250 by 250
If Weeks.Count = 4 Then
PnlCalender.Width = 100
PnlCalender.Height = 100
ElseIf arrWeeks.Count = 5 Then
PnlCalender.Width = 250
PnlCalender.Height = 250
ElseIf arrWeeks.Count = 6 Then
PnlCalender.Width = 270
PnlCalender.Height = 270
End If
Any idea? Thanks!!!!!