Foros del Web » Programando para Internet » ASPX (.net) »

Variable de sesion

Estas en el tema de Variable de sesion en el foro de ASPX (.net) en Foros del Web. HOLA CHICOS TENGO UN PROBLEMA GRANDE. LA COSA ES QUE TENGO Q SUMARLE A LA VARIABLE DE SESION UN 1 O UN 0, DEPENDIENDO DE ...
  #1 (permalink)  
Antiguo 22/11/2010, 11:35
 
Fecha de Ingreso: noviembre-2010
Mensajes: 49
Antigüedad: 13 años, 6 meses
Puntos: 0
Variable de sesion

HOLA CHICOS TENGO UN PROBLEMA GRANDE. LA COSA ES QUE TENGO Q SUMARLE A LA VARIABLE DE SESION UN 1 O UN 0, DEPENDIENDO DE LA OPCION DADA DE CADA UNO DE LOS 60 FORM QUE CREE.

ESTE ES EL CODIGO DEL BOTON SIGUIENTE QUE ES EL QUE LLEVA AL SIGUIENTE FORM Y ADEMAS SUMA LAS VARIABLES DE LOS RADIO BUTTON


Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim resultado As String = System.Web.Configuration.WebConfigurationManager.A ppSettings("DirRaiz").ToString

//SUPUESTAMENTE ASI ME DIJERON Q DEVIESE LLAMAR A LA VARIABLE SESION

If RadioButton1.Checked = True Then

resultado = 0 + resultado
End If

If RadioButton2.Checked = True Then

resultado = 0 + resultado
End If

If RadioButton3.Checked = True Then

resultado = 0 + resultado
End If

If RadioButton4.Checked = True Then

resultado = 1 + resultado
End If

If RadioButton5.Checked = True Then

resultado = 0 + resultado
End If

If RadioButton6.Checked = True Then

resultado = 0 + resultado
End If






End Sub

ESTE ES EL CODIGO QUE PUSE DENTRO DEL WEBCONFIG PARA LA VARIABLE SESION

<appSettings>
<add key="DirRaiz" value="/CarpetaUOtroValor" />
</appSettings>



LO QUE ESTOY HACIENDO AKI ES UN TEST EN LA CUAL SE UTILIZA UNA SOLA VARIABLE PARA CALCULAR EL RESULTADO QUE EN ESTE CASO SERIA "RESULTADO" COMO LA VARIABLE GLOBAL.
PERO NO PUEDO SUMAR LOS NUMEROS DE LA VARIABLE ANTERIOR

AYUDA PORFAVOR
GRAXIAS
  #2 (permalink)  
Antiguo 22/11/2010, 14:09
 
Fecha de Ingreso: marzo-2007
Mensajes: 103
Antigüedad: 17 años, 2 meses
Puntos: 1
Respuesta: Variable de sesion

Eso no es una variable de sesion, seria mas de configuracion...

Para una variable de sesion la declaras cuando la creas de la siguiente manera

Session("tuVariable") = 0

Y para consultarla en el caso de querer sumarle

Session("tuVariable") = ctype(Session("tuVariable"), Integer) + 1
__________________
Julio César Guzmán Góngora
Microsoft Certified Professional
[email protected]
[email protected]
  #3 (permalink)  
Antiguo 22/11/2010, 14:24
 
Fecha de Ingreso: noviembre-2010
Mensajes: 49
Antigüedad: 13 años, 6 meses
Puntos: 0
Respuesta: Variable de sesion

Pero donde declaro la variable de sesion

Etiquetas: aspx, variables
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 01:27.