concatenar textbox y campo date
Publicado por saneia123 (1 intervención) el 22/03/2022 14:39:04
Hola Buenas tardes estoy tratando de capturar el la fecha de un calendar que esta metido dentro de textbox lo tengo como textbox pero el string no me traes la información y no se como modificar hacer para que me tome la fecha.
les adjunto el código que tengo. y también el formulario.
DetalleForm.Fill(complementacion);
foreach (DataRow row in complementacion.Rows)
{
var str = "<script LANGUAGE='JavaScript' >alert('" + row["Fecha"].ToString().Substring(0, 10) + "')</script>";
Response.Write(str);
GetTxtFecha.Text = row["Fecha"].ToString();
GetTxtAvisoot.Text = row["Avisoot"].ToString();
GetTxtDireccion.Text = row["Direccion"].ToString();
GetTxtMatricula.Text = row["Matricula"].ToString();
GetListSupervisores.SelectedValue = row["idDestinatario"].ToString();
GetTxtObservaciones.Text = row["Observacion"].ToString();
if (row["ServicioAridos"].ToString() == "1") GetCheckArido.Checked = true;
if (row["ServicioGeneradoCompresor"].ToString() == "1") GetCheckGCompresor.Checked = true;
if (row["ServicioMartillo"].ToString() == "1") GetCheckMartillo.Checked = true;
if (row["ServicioGrua"].ToString() == "1") GetCheckDServGrua.Checked = true;
if (row["OtrosServicio"].ToString() == "1") GetCheckotro.Checked = true;
if (row["ServicioBombas"].ToString() == "1") GetCheckBombas.Checked = true;
if (row["ServicioHerramientas"].ToString() == "1") GetCheckHerramientas.Checked = true;
if (row["ServicioTuberiaMateriales"].ToString() == "1") GetCheckTubemateria.Checked = true;
if (row["ServicioSenalizacion"].ToString() == "1") GetCheckSenalizacion.Checked = true;
}
les adjunto el código que tengo. y también el formulario.
DetalleForm.Fill(complementacion);
foreach (DataRow row in complementacion.Rows)
{
var str = "<script LANGUAGE='JavaScript' >alert('" + row["Fecha"].ToString().Substring(0, 10) + "')</script>";
Response.Write(str);
GetTxtFecha.Text = row["Fecha"].ToString();
GetTxtAvisoot.Text = row["Avisoot"].ToString();
GetTxtDireccion.Text = row["Direccion"].ToString();
GetTxtMatricula.Text = row["Matricula"].ToString();
GetListSupervisores.SelectedValue = row["idDestinatario"].ToString();
GetTxtObservaciones.Text = row["Observacion"].ToString();
if (row["ServicioAridos"].ToString() == "1") GetCheckArido.Checked = true;
if (row["ServicioGeneradoCompresor"].ToString() == "1") GetCheckGCompresor.Checked = true;
if (row["ServicioMartillo"].ToString() == "1") GetCheckMartillo.Checked = true;
if (row["ServicioGrua"].ToString() == "1") GetCheckDServGrua.Checked = true;
if (row["OtrosServicio"].ToString() == "1") GetCheckotro.Checked = true;
if (row["ServicioBombas"].ToString() == "1") GetCheckBombas.Checked = true;
if (row["ServicioHerramientas"].ToString() == "1") GetCheckHerramientas.Checked = true;
if (row["ServicioTuberiaMateriales"].ToString() == "1") GetCheckTubemateria.Checked = true;
if (row["ServicioSenalizacion"].ToString() == "1") GetCheckSenalizacion.Checked = true;
}
Valora esta pregunta


0