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

(DUDA principiante) VB.NET

Estas en el tema de (DUDA principiante) VB.NET en el foro de .NET en Foros del Web. Hola tengo una duda que no consigo aclarar probando una estructura de VB.NET ¿Como hago para recorrer con el bucle el array e ir mostrandolo ...
  #1 (permalink)  
Antiguo 17/04/2008, 05:05
 
Fecha de Ingreso: octubre-2007
Mensajes: 57
Antigüedad: 16 años, 7 meses
Puntos: 0
Pregunta (DUDA principiante) VB.NET

Hola tengo una duda que no consigo aclarar probando una estructura de VB.NET

¿Como hago para recorrer con el bucle el array e ir mostrandolo en pantalla del navegador?
con innerHtml solo me muestra el ultimo valor

arrays.aspx
Código PHP:
<%@ Page Language="VB" CodeFile="041_ejemplo_arrays.aspx.vb" Inherits="_Default" %>

<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<
html xmlns="http://www.w3.org/1999/xhtml" >
<
head runat="server">
    <
title>Página sin título</title>
</
head>
<
body>
    <
p id="p1" runat="server"/>
    
</
body>
</
html
arrays.aspx.vb
Código PHP:
Partial Class _Default
    Inherits System
.Web.UI.Page
 
    Dim numeros
() As Integer = {123}
    
Dim num2() As Integer numeros

    Sub Page_Load
()
        For 
As Integer 0 To num2.Length 1
            p1
.InnerHtml = (num2(i))
        
Next

    End Sub
End 
Class 
gracias
  #2 (permalink)  
Antiguo 17/04/2008, 06:48
Avatar de Peterpay
Colaborador
 
Fecha de Ingreso: septiembre-2007
Ubicación: San Francisco, United States
Mensajes: 3.858
Antigüedad: 16 años, 8 meses
Puntos: 87
Re: (DUDA principiante) VB.NET

p1.InnnerHtml &= num2(i)

en c# seria

p1.InnnerHtml += num2(i)

pero creo el primero te funcionara
__________________
Curso WF4
http://cursos.gurudotnet.com/ DF
Aprende HTML5
  #3 (permalink)  
Antiguo 17/04/2008, 07:15
 
Fecha de Ingreso: octubre-2007
Mensajes: 57
Antigüedad: 16 años, 7 meses
Puntos: 0
Re: (DUDA principiante) VB.NET

muchas gracias funciona perfectamente
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

SíEste tema le ha gustado a 1 personas (incluyéndote)




La zona horaria es GMT -6. Ahora son las 04:15.