Ver Mensaje Individual
  #11 (permalink)  
Antiguo 12/12/2012, 09:32
maialenlopez
 
Fecha de Ingreso: abril-2012
Mensajes: 449
Antigüedad: 12 años, 1 mes
Puntos: 7
Respuesta: Dato de un aspx a otro aspx al darle a un boton

Ahora creo que si se parece a lo tuyo pero tengo un problema.
Escribo el código de cada aspx.vb y luego comento lo que me pasa:

Identificador.aspx.vb:
Código vb.net:
Ver original
  1. Public Class Identificador
  2.     Inherits System.Web.UI.Page
  3.  
  4.     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  5.  
  6.     End Sub
  7.  
  8. #Region "Propiedades"
  9.     Public ReadOnly Property Numero() As String
  10.         Get
  11.             Return Me.TxtIdNumIdentificador.Text
  12.         End Get
  13.     End Property
  14. #End Region
  15.  
  16.     Public Property MyProperty() As Integer
  17.         Get
  18.             Return m_MyProperty
  19.         End Get
  20.         Set(ByVal value As Integer)
  21.             m_MyProperty = Value
  22.         End Set
  23.     End Property
  24.  
  25.     Private m_MyProperty As Integer
  26.  
  27.     Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
  28.         If TxtIdNumIdentificador.Text = "" Then
  29.             ValidacionAsterisco23.Text = "*"
  30.             validacion4.Text = "Identificador incorrecto"
  31.         Else
  32.             'Dependiendo del identificador, Me carga una pagin u otra
  33.             Response.Redirect("VRHojaLiquidacionGastos.aspx")
  34.         End If
  35.     End Sub
  36. End Class

VRHojaLiquidacionGastos.aspx.vb:
Código vb.net:
Ver original
  1. Public Class VRHojaLiquidacionGastos
  2.     Inherits System.Web.UI.Page
  3.  
  4.     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  5.  
  6.         Dim numHoja As String
  7.  
  8.         If PreviousPage IsNot Nothing Then
  9.             numHoja = String.Format([B]PreviousPage.Numero[/B])
  10.         End If
  11.     End Sub
  12.  
  13. End Class

Pero lo que he puesto en negrita dentro del codigo me sale subrayado indicando que: 'Numero' no es miembro de System.Web.UI.Page
__________________
Gracias por todo;

Un saludo