|
 |
aspx_espanol thread: Equivalencia en ASP de if Not page.IsPostBack de ASP.NET
Message #1 by "Begoņa Hormaechea" <bh@a...> on Thu, 21 Nov 2002 07:32:23
|
|
Se me ocurre algo mas para eso
I =3D 0
For each strItem in Request.Form
I =3D I + 1
Next
If I =3D 0 then
'Not postback
else
'Is postback
end if
Cambia el Form por querystring si utilizas es posteado por GET
Cuento si hay alguna variable o algo en el array Request.Form, si no lo
hay (i=3D0)no esta postbackeada ;)
-----Original Message-----
From: Alfredo Bustamante [mailto:alfredo.bustamante@w...]
Sent: Jueves, 21 de Noviembre de 2002 08:39 a.m.
To: ASP.Net en Espa=F1ol
Subject: [aspx_espanol] Re: Equivalencia en ASP de if Not
page.IsPostBack de ASP.NET
Hola el siguiente es un ejemplo de una p=E1gina que al cargarse por
primera
ves construye unos combos
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Dim misregionalescombo As williscomponents.CONSULTAS
Dim miresultado As New DataTable()
Dim mifila As DataRow
misregionalescombo =3D New williscomponents.CONSULTAS()
misregionalescombo.Armar_Regionales("", miresultado, 1)
For Each mifila In miresultado.Rows
drpregional.Items.Add(New
ListItem(mifila.Item(1).ToString,
RTrim(mifila.Item(0).ToString)))
Next
Dim i As Integer
For i =3D Year(Today) + 1 To Year(Today) - 10 Step -1
drpa=F1odesde.Items.Add(New ListItem(i))
drpa=F1ohasta.Items.Add(New ListItem(i))
Next
For i =3D 1 To 12
If i < 10 Then
drpmesdesde.Items.Add(New ListItem("0" & i))
drpmeshasta.Items.Add(New ListItem("0" & i))
Else
drpmesdesde.Items.Add(New ListItem(i))
drpmeshasta.Items.Add(New ListItem(i))
End If
Next
For i =3D 1 To 31
If i < 10 Then
drpdiadesde.Items.Add(New ListItem("0" & i))
drpdiahasta.Items.Add(New ListItem("0" & i))
Else
drpdiadesde.Items.Add(New ListItem(i))
drpdiahasta.Items.Add(New ListItem(i))
End If
Next
End If
End Sub
_____________________________________________________________
The information in this email and in any attachments is
confidential and may be privileged. If you are not the intended
recipient, please destroy this message, delete any copies held on
your
systems and notify the sender immediately. You should not retain,
copy or use this email for any purpose, nor disclose all or any
part
of its content to any other person.
---
Usted est=E1 suscrito a aspx_espanol como:
paulino.suero@c...
Para darse de baja, env=EDe un mensaje en blanco a
%%email.unsub%%
|
|
 |