PDA

View Full Version : [CLOSED] Retrieve Object TextField



mapperez
Aug 11, 2014, 5:00 PM
protected void CreaSecciones(int IDdoc) {

String sql = "";
int IDsEC = 0;

sql = "select ID_SECCION,SECCION,IMAGE_URL,IMAGE_PRES from DOCUMENTO_SECCIONES WHERE ID_DOCUMENTO=" + IDdoc.ToString();

DataSet Mdata = new DataSet();
DataTable Mtbla = new DataTable();

Mdata = Class_dB.Tsql(sql);
Mtbla = Mdata.Tables[0];


for (int x = 0; x < Mtbla.Rows.Count - 1; x++) {

ImageButton Mboton = new ImageButton();

Mboton.ID = "btn_sec_" + x.ToString() ;
Mboton.Width = 200;
Mboton.Height = 50;
Mboton.ImageUrl=Mtbla.Rows[x][2].ToString().Trim();
Mboton.PressedImageUrl = Mtbla.Rows[x][3].ToString().Trim();
IDsEC = int.Parse(Mtbla.Rows[x][0].ToString());

Mboton.Listeners.Click.Handler = "#{DirectMethods}.Click_Generico(" + IDsEC + ");";

pnel_01.Items.Add(Mboton);

}


pnel_01.UpdateContent();


}


[DirectMethod]
public void Click_Generico(int idsub)
{
CreaPanel(idsub);
}






Here I need to retrieve the Textfield object, but there do not know how to retrieve this object.




[DirectMethod]
public void Click_Item(int op,String ItemSel)
{


String NombreObj = "";
NombreObj = "txt_" + ItemSel;

var ctl = X.GetCtl(NombreObj);






}

geoffrey.mcgill
Aug 11, 2014, 5:23 PM
The sample you provided does not include a TextField. Please post a simplified sample which demonstrates how to reproduce the problem.