Ver Mensaje Individual
  #4 (permalink)  
Antiguo 16/06/2005, 03:55
imanol22
 
Fecha de Ingreso: abril-2005
Mensajes: 55
Antigüedad: 19 años, 1 mes
Puntos: 0
el codigo de la pagina.vb es el siguiente(1trozo de codigo):
Código PHP:
Public Class WebForm1
    Inherits System
.Web.UI.Page
    
Protected WithEvents Radio As System.Web.UI.WebControls.RadioButtonList
    
Protected WithEvents dg As System.Web.UI.WebControls.DataGrid
    
Protected WithEvents repeater1 As System.Web.UI.WebControls.Repeater
    
Protected WithEvents preg_1 As System.Web.UI.WebControls.Label
    
Public tipouno As Boolean
    
Public tipodos As Boolean

 
Private Sub Page_Load(ByVal sender As System.ObjectByVal e As System.EventArgsHandles MyBase.Load
        Dim cn 
As New OleDb.OleDbConnection()
        
Dim da As New OleDb.OleDbDataAdapter()
        
Dim ds As New DataSet()
        
Dim str As String


        str 
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Inetpub\wwwroot\Encuestas\encuestas.mdb"
        
cn.ConnectionString str
        cn
.Open()
        If 
Not Page.IsPostBack Then

            da 
= New OleDb.OleDbDataAdapter("select pre_descrip,pre_id,pre_tipo from preguntas where enc_id = 1"cn)
            
ds = New DataSet()

            
da.Fill(ds"preguntas")

            
repeater1.DataSource ds.Tables("preguntas")
            
repeater1.DataBind()

        
End If
    
End Sub

    
Public Function Gen(ByVal tipo) As String
        
If tipo 1 Then
            tipouno 
True
            tipodos 
False
        
ElseIf tipo 2 Then
            tipouno 
False
            tipodos 
True
        End 
If
    
End Function