Hello, I am handling the following form in ASP :
<tr>
<td width="20%">
<dx:ASPxLabel runat="server" Text="Documento"></dx:ASPxLabel>
</td>
<td width="20%">
<dx:ASPxComboBox runat="server" ID="cbTipoDocPop" AutoPostBack="False" ClientVisible="true" EnableClientSideAPI="True"></dx:ASPxComboBox>
</td>
<td>
<dx:ASPxTextBox runat="server" ID="txtCedulaPop"></dx:ASPxTextBox>
</td>
</tr>
<tr>
<td colspan="3">
<asp:Button ID="btnEnviar" runat="server" Text="Traer Registros" OnClick="btnEnviar_Click" />
</td>
</tr>
<tr>
At the moment of obtaining values using the function OnClick="btnEnviar_Click"
does not take the values, it takes them as the initials as if they had not been changed.
protected void btnEnviar_Click(object sender, EventArgs e)
{
if (txtCedulaPop.Text != null && cbTipoDocPop.SelectedIndex >= 0)
{
CustomEntity custom = new CustomEntity();
custom.StringPrincipal = txtCedulaPop.Text;
custom.StringSecundario = cbTipoDocPop.SelectedItem.Value.ToString();
Pacientes pacienteActual = PatientFacade.GetByIdPacienteDocumento(custom);
if (pacienteActual == null)
{
Response.Write("<script>alert('No se encontro Paciente');</script>");
}
else {
}
}
else
{
Response.Write("<script>alert('Los campos son obligatorios');</script>");
}
}
Regardless of what you type, you always recognize the fields as empty or with the values you assign them initially Am I doing wrong ?, so I ask your help to identify the problem, thank you very much