Tema: calendario
Ver Mensaje Individual
  #6 (permalink)  
Antiguo 26/01/2005, 14:28
Avatar de Sayra
Sayra
 
Fecha de Ingreso: diciembre-2004
Mensajes: 365
Antigüedad: 20 años, 2 meses
Puntos: 1
Hola RootK
Ya lo hice asi
<%@ Page language="VB" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="Rainbow.DesktopModules.CalendarCliente.W ebForm1" debug=true%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<script language="VB" runat="server">

Sub Calendar1_SelectionChanged(sender As Object, e As EventArgs)
AddtoMonth(Calendar1.SelectedDate)
End Sub

Sub AddtoMonth(NewMonth As DateTime)
Dim Dm as datetime= new DateTime(2005,1,1)
Dim i as integer
Dim C as new Calendar()
For i=1 to 12
C.ID = "Calendar1" + i
C.TodaysDate = Dm
Panel1.Controls.Add(C)
Dm = Dm.AddMonths(1)
Next i
End Sub

</script>
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<asp:Panel id="Panel1" runat="server">Panel</asp:Panel>
<asp:calendar id="Calendar1" runat="server" OnSelectionChanged="Calendar1_SelectionChanged" BorderStyle="Solid"
Font-Name="verdana" Font-Size="8px" Height="30px" Width="35px" DayHeaderStyle-BackColor="gainsboro"
OtherMonthDayStyle-ForeColor="gray" TitleStyle-BackColor="gray" TitleStyle-Font-Bold="True"
TitleStyle-Font-Size="9px" SelectedDayStyle-Font-Bold="True" TodayDayStyle-BackColor="">
<TodayDayStyle backcolor="Coral"></TodayDayStyle>
<DayHeaderStyle backcolor="Gainsboro"></DayHeaderStyle>
<TitleStyle font-size="9px" font-bold="True" backcolor="Gray"></TitleStyle>
<OtherMonthDayStyle forecolor="Gray"></OtherMonthDayStyle>
</asp:calendar>
</form>
</body>
</HTML>



y me da el siguiente error System.FormatException: Input string was not in a correct format y señala la linea
C.ID = "Calendar1" + i