Foros del Web » Programación para mayores de 30 ;) » .NET »

codigo entero.....

Estas en el tema de codigo entero..... en el foro de .NET en Foros del Web. aca esta la pagina 1 [QUOTE<head> <script language="vb" runat="server"> dim fechaingreso as string dim fechaconyuge as string dim fechatitular as string dim fechainforme as string ...
  #1 (permalink)  
Antiguo 21/04/2008, 17:50
 
Fecha de Ingreso: marzo-2008
Mensajes: 286
Antigüedad: 16 años, 8 meses
Puntos: 1
codigo entero.....

aca esta la pagina 1

[QUOTE<head>
<script language="vb" runat="server">
dim fechaingreso as string
dim fechaconyuge as string
dim fechatitular as string
dim fechainforme as string
dim fechavigencia as string


Sub Page_Load(sender1 as Object, e1 as EventArgs) If Not IsPostBack
RellenarDDLYears()
ddlYear.SelectedValue = Date.Now.Year

RellenarDDLMonths()
ddlMonth.SelectedIndex = Date.Now.Month - 1

RellenarDDLDays(ddlMonth.SelectedIndex + 1)
ddlDay.SelectedValue = Date.Now.Day



RellenarDDLYears1()
ddlYear1.SelectedValue = Date.Now.Year

RellenarDDLMonths1()
ddlMonth1.SelectedIndex = Date.Now.Month - 1

RellenarDDLDays1(ddlMonth1.SelectedIndex + 1)
ddlDay1.SelectedValue = Date.Now.Day


RellenarDDLYears2()
ddlYear2.SelectedValue = Date.Now.Year

RellenarDDLMonths2()
ddlMonth2.SelectedIndex = Date.Now.Month - 1

RellenarDDLDays2(ddlMonth2.SelectedIndex + 1)
ddlDay2.SelectedValue = Date.Now.Day


RellenarDDLYears3()
ddlYear3.SelectedValue = Date.Now.Year

RellenarDDLMonths3()
ddlMonth3.SelectedIndex = Date.Now.Month - 1

RellenarDDLDays3(ddlMonth3.SelectedIndex + 1)
ddlDay3.SelectedValue = Date.Now.Day


RellenarDDLYears4()
ddlYear4.SelectedValue = Date.Now.Year

RellenarDDLMonths4()
ddlMonth4.SelectedIndex = Date.Now.Month - 1

RellenarDDLDays4(ddlMonth4.SelectedIndex + 1)
ddlDay4.SelectedValue = Date.Now.Day





End If


fechaingreso = ddlDay.SelectedValue &"/"& ddlMonth.SelectedValue &"/"& ddlYear.SelectedValue
fechatitular = ddlDay1.SelectedValue &"/"& ddlMonth1.SelectedValue &"/"& ddlYear1.SelectedValue
fechaconyuge = ddlDay2.SelectedValue &"/"& ddlMonth2.SelectedValue &"/"& ddlYear2.SelectedValue
fechainforme = ddlDay3.SelectedValue &"/"& ddlMonth3.SelectedValue &"/"& ddlYear3.SelectedValue
fechavigencia = ddlDay4.SelectedValue &"/"& ddlMonth4.SelectedValue &"/"& ddlYear4.SelectedValue



End Sub



Sub Cambia_Mes(sender as Object, e As EventArgs)
Session("ssDaySelected") = ddlDay.SelectedIndex
RellenarDDLDays(sender.SelectedIndex + 1)
End Sub


Sub Cambia_Mes1(sender as Object, e As EventArgs)
Session("ssDaySelected") = ddlDay1.SelectedIndex
RellenarDDLDays1(sender.SelectedIndex + 1)
End Sub

Sub Cambia_Mes2(sender as Object, e As EventArgs)
Session("ssDaySelected") = ddlDay2.SelectedIndex
RellenarDDLDays2(sender.SelectedIndex + 1)
End Sub

Sub Cambia_Mes3(sender as Object, e As EventArgs)
Session("ssDaySelected") = ddlDay3.SelectedIndex
RellenarDDLDays3(sender.SelectedIndex + 1)
End Sub


Sub Cambia_Mes4(sender as Object, e As EventArgs)
Session("ssDaySelected") = ddlDay4.SelectedIndex
RellenarDDLDays4(sender.SelectedIndex + 1)
End Sub


Sub RellenarDDLDays(ipMes As Integer)
ddlDay.Items.Clear()
Dim endDayNumber, i As Integer
If ipMes.Equals(1) Or ipMes.Equals(3) Or ipMes.Equals(5) Or ipMes.Equals(7) Or ipMes.Equals(8) Or ipMes.Equals(10) Or ipMes.Equals(12)
endDayNumber = 31
Else If ipMes.Equals(4) Or ipMes.Equals(6) Or ipMes.Equals(9) Or ipMes.Equals(11)
endDayNumber = 30
Else
endDayNumber = 28
End If
For i = 1 To endDayNumber
ddlDay.Items.Add(i)
ddlDay.DataValueField = i
ddlDay.DataTextField = i
Next

If Not Session("ssDaySelected") Is Nothing Then
ddlDay.SelectedIndex = Convert.toInt32(Session("ssDaySelected"))
Session.Clear()
End If
End Sub




Sub RellenarDDLDays1(ipMes As Integer)
ddlDay1.Items.Clear()
Dim endDayNumber, i As Integer
If ipMes.Equals(1) Or ipMes.Equals(3) Or ipMes.Equals(5) Or ipMes.Equals(7) Or ipMes.Equals(8) Or ipMes.Equals(10) Or ipMes.Equals(12)
endDayNumber = 31
Else If ipMes.Equals(4) Or ipMes.Equals(6) Or ipMes.Equals(9) Or ipMes.Equals(11)
endDayNumber = 31
Else
endDayNumber = 31
End If
For i = 1 To endDayNumber
ddlDay1.Items.Add(i)
ddlDay1.DataValueField = i
ddlDay1.DataTextField = i
Next

If Not Session("ssDaySelected") Is Nothing Then
ddlDay1.SelectedIndex = Convert.toInt32(Session("ssDaySelected"))
Session.Clear()
End If
End Sub

Sub RellenarDDLDays2(ipMes As Integer)
ddlDay2.Items.Clear()
Dim endDayNumber, i As Integer
If ipMes.Equals(1) Or ipMes.Equals(3) Or ipMes.Equals(5) Or ipMes.Equals(7) Or ipMes.Equals(8) Or ipMes.Equals(10) Or ipMes.Equals(12)
endDayNumber = 31
Else If ipMes.Equals(4) Or ipMes.Equals(6) Or ipMes.Equals(9) Or ipMes.Equals(11)
endDayNumber = 31
Else
endDayNumber = 31
End If
For i = 1 To endDayNumber
ddlDay2.Items.Add(i)
ddlDay2.DataValueField = i
ddlDay2.DataTextField = i
Next

If Not Session("ssDaySelected") Is Nothing Then
ddlDay2.SelectedIndex = Convert.toInt32(Session("ssDaySelected"))
Session.Clear()
End If
End Sub


Sub RellenarDDLDays3(ipMes As Integer)
ddlDay3.Items.Clear()
Dim endDayNumber, i As Integer
If ipMes.Equals(1) Or ipMes.Equals(3) Or ipMes.Equals(5) Or ipMes.Equals(7) Or ipMes.Equals(8) Or ipMes.Equals(10) Or ipMes.Equals(12)
endDayNumber = 31
Else If ipMes.Equals(4) Or ipMes.Equals(6) Or ipMes.Equals(9) Or ipMes.Equals(11)
endDayNumber = 31
Else
endDayNumber = 31
End If
For i = 1 To endDayNumber
ddlDay3.Items.Add(i)
ddlDay3.DataValueField = i
ddlDay3.DataTextField = i
Next

If Not Session("ssDaySelected") Is Nothing Then
ddlDay3.SelectedIndex = Convert.toInt32(Session("ssDaySelected"))
Session.Clear()
End If
End Sub


Sub RellenarDDLDays4(ipMes As Integer)
ddlDay4.Items.Clear()
Dim endDayNumber, i As Integer
If ipMes.Equals(1) Or ipMes.Equals(3) Or ipMes.Equals(5) Or ipMes.Equals(7) Or ipMes.Equals(8) Or ipMes.Equals(10) Or ipMes.Equals(12)
endDayNumber = 31
Else If ipMes.Equals(4) Or ipMes.Equals(6) Or ipMes.Equals(9) Or ipMes.Equals(11)
endDayNumber = 31
Else
endDayNumber = 31
End If
For i = 1 To endDayNumber
ddlDay4.Items.Add(i)
ddlDay4.DataValueField = i
ddlDay4.DataTextField = i
Next

If Not Session("ssDaySelected") Is Nothing Then
ddlDay4.SelectedIndex = Convert.toInt32(Session("ssDaySelected"))
Session.Clear()
End If
End Sub

Sub RellenarDDLYears()
ddlYear.Items.Clear()
Dim i As Integer
For i = 1990 To 2100
ddlYear.Items.Add(i)
Next
End Sub


Sub RellenarDDLYears1()
ddlYear1.Items.Clear()
Dim i As Integer
For i = 1990 To 2100
ddlYear1.Items.Add(i)
Next
End Sub

Sub RellenarDDLYears2()
ddlYear2.Items.Clear()
Dim i As Integer
For i = 1990 To 2100
ddlYear2.Items.Add(i)
Next
End Sub


Sub RellenarDDLYears3()
ddlYear3.Items.Clear()
Dim i As Integer
For i = 1990 To 2100
ddlYear3.Items.Add(i)
Next
End Sub

Sub RellenarDDLYears4()
ddlYear4.Items.Clear()
Dim i As Integer
For i = 1990 To 2100
ddlYear4.Items.Add(i)
Next
End Sub

Sub RellenarDDLMonths()
ddlMonth.Items.Clear()
Dim Meses As String() = {"Enero","Febrero","Marzo","Abril","Mayo","Junio", "Julio","Agosto","Septiembre","Octubre","Noviembre ","Diciembre"}
Dim i As Integer
For i = 0 To Meses.Length()-1
ddlMonth.Items.Add(Meses(i))
ddlMonth.DataValueField = i
ddlMonth.DataTextField = Meses(i)
Next

End Sub

Sub RellenarDDLMonths1()
ddlMonth1.Items.Clear()
Dim Meses As String() = {"Enero","Febrero","Marzo","Abril","Mayo","Junio", "Julio","Agosto","Septiembre","Octubre","Noviembre ","Diciembre"}
Dim i As Integer
For i = 0 To Meses.Length()-1
ddlMonth1.Items.Add(Meses(i))
ddlMonth1.DataValueField = i
ddlMonth1.DataTextField = Meses(i)
Next

End Sub


Sub RellenarDDLMonths2()
ddlMonth2.Items.Clear()
Dim Meses As String() = {"Enero","Febrero","Marzo","Abril","Mayo","Junio", "Julio","Agosto","Septiembre","Octubre","Noviembre ","Diciembre"}
Dim i As Integer
For i = 0 To Meses.Length()-1
ddlMonth2.Items.Add(Meses(i))
ddlMonth2.DataValueField = i
ddlMonth2.DataTextField = Meses(i)
Next

End Sub


Sub RellenarDDLMonths3()
ddlMonth3.Items.Clear()
Dim Meses As String() = {"Enero","Febrero","Marzo","Abril","Mayo","Junio", "Julio","Agosto","Septiembre","Octubre","Noviembre ","Diciembre"}
Dim i As Integer
For i = 0 To Meses.Length()-1
ddlMonth3.Items.Add(Meses(i))
ddlMonth3.DataValueField = i
ddlMonth3.DataTextField = Meses(i)
Next

End Sub



Sub RellenarDDLMonths4()
ddlMonth4.Items.Clear()
Dim Meses As String() = {"Enero","Febrero","Marzo","Abril","Mayo","Junio", "Julio","Agosto","Septiembre","Octubre","Noviembre ","Diciembre"}
Dim i As Integer
For i = 0 To Meses.Length()-1
ddlMonth4.Items.Add(Meses(i))
ddlMonth4.DataValueField = i
ddlMonth4.DataTextField = Meses(i)
Next


End Sub


Sub Button2_Click(sender1 As Object, e1 As EventArgs)

dim parametro1 as string

parametro1 = NumDNI.Text

Response.Redirect("pagina2.aspx?parametro1=" & parametro1)

end sub

</script>
<meta http-equiv="Content-Type" content="text/html; charsfinancieraet=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>

</head>
<body>

<form action="" method="post" name="form1" id="form1" runat="server">
.
.
<asp:Button ID="Button2_Click" runat="server" Text="Probar" />
  #2 (permalink)  
Antiguo 22/04/2008, 06:44
Avatar de jhonwilliams  
Fecha de Ingreso: marzo-2004
Ubicación: Copacabana - Colombia
Mensajes: 1.484
Antigüedad: 20 años, 8 meses
Puntos: 76
Re: codigo entero.....

Y para que sirve este codigo? tienes problemas o es para enseñarle a alguien como solucionaste o hiciste algo?

Saludos
__________________
Si mi respuesta te ha ayudado, agradezco que me regales unos puntos de Karma XD.

"Una mujer sería encantadora si uno pudiera caer en sus brazos sin caer en sus manos." (Ambrose Bierce)
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 22:09.