I have DropDownList
with some items, and I did a click event to get what is selected and redirect to a page, but it is not working right, see:
switch(ddlMenu.SelectedValue){
case "0":
lblMensagem.Text = "Por favor, selecione uma opção valida";
break;
case "1":
Response.Redirect("/pages/cadastro.aspx");
break;
case "2":
Response.Redirect("/pages/consultas.aspx");
break;
case "3":
Response.Redirect("/pages/detalhes.aspx");
break;
}
The problem is that only works item 0, and item 1, 2 and 3 the result is as if it were item 0.
Does anyone know why it's wrong?