Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/06/2006, 14:47
Avatar de krloss
krloss
 
Fecha de Ingreso: abril-2006
Mensajes: 55
Antigüedad: 18 años, 1 mes
Puntos: 1
Tabla creada dianmicamnete xq no me muestra sus elementos

bueno lo q escribi es lo sgte

Código PHP:
private void Page_Load(object senderSystem.EventArgs e)
        {
            
// Introducir aquí el código de usuario para inicializar la página
            
l_3.Visible=false;
            
bo_2.Visible=false;
            
funcion();
        }

        
#region Código generado por el Diseñador de Web Forms
        
override protected void OnInit(EventArgs e)
        {
            
//
            // CODEGEN: llamada requerida por el Diseñador de Web Forms ASP.NET.
            //
            
InitializeComponent();
            
base.OnInit(e);
        }
        
        
/// <summary>
        /// Método necesario para admitir el Diseñador. No se puede modificar
        /// el contenido del método con el editor de código.
        /// </summary>
        
private void InitializeComponent()
        {    
            
this.bo_1.Click += new System.EventHandler(this.bo_1_Click);
            
this.bo_2.Click += new System.EventHandler(this.bo_2_Click);
            
this.Load += new System.EventHandler(this.Page_Load);

        }
        
#endregion

        
public void funcion()
        {
            if(
a!=0)
            {
                
TableRow objrow=new TableRow();
            
                
TableCell objcell=new TableCell();
                
objcell.Text "Numero pregunta";
                
objcell.BorderWidth Unit.Pixel(1);
                
objrow.Cells.Add(objcell);
                
objcell=new TableCell();
                
objcell.Text "";
                
objcell.BorderWidth Unit.Pixel(1);
                
objrow.Cells.Add(objcell);
                
objcell=new TableCell();
                
objcell.Text "";
                
objcell.BorderWidth Unit.Pixel(1);
                
objrow.Cells.Add(objcell);
        
                
tablas.Rows.Add(objrow);
                
int b=0;
                while(
b!=a)
                {
                
                    
TextBox objTextBox = new TextBox();
                    
objTextBox.ID "categ" "-"+b;
                    
objTextBox.Text "";
                    
Label objLabel=new Label();
                    
objLabel.ID="label_"+b;
                    
objLabel.Text="Nª "+b;
                    
CheckBox objCheckBox=new CheckBox();
                    
objrow = new TableRow();
                    
TableCell objCell = new TableCell();
                    
objCell.Controls.Add(objLabel);
                    
objrow.Cells.Add(objCell);
                    
objCell = new TableCell();
                    
objCell.Controls.Add(objTextBox);
                    
objrow.Cells.Add(objCell);
                    
objCell = new TableCell();
                    
objCell.Controls.Add(objCheckBox);
                    
objrow.Cells.Add(objCell);
                    
tablas.Rows.Add(objrow);
                    
b++;
                }
            }

        }
        private 
void bo_1_Click(object sender,System.EventArgs e)
        {
            
tablas.Rows.Clear();
            
a=Convert.ToInt32(text_2.Text);         
            if(
text_1.Text.Length>32)
            {
                
text_1.TextMode TextBoxMode.MultiLine;
            }
            
funcion();
            
l_3.Visible=true;
            
bo_2.Visible=true;
              
Response.Write("<script>alert('Debe  "tablas.Rows[1].Cells[1].Text+" Ingresar una actividad escriba por favor"+"')</script>");
        } 

Response.Write("<script>alert('Debe "+ tablas.Rows[1].Cells[1].Text+" Ingresar una actividad escriba por favor"+"')</ aqui me muestra nada pero hay datos incluidos