-5

I have a dropdownlist in my view which consists of true and false. But I am storing one more value which I need to pass to controller.

@Html.DropDownListFor(x => x.DropDown, Model.DropDown, new {Id  = "DropDown,@Text="782});



$('#DropDown').change(function() {

    var y = $(this).val();
    alert(y);

});

Currently I have a jquery dropdownchange function to get true or false.

But how can I get this @text value in jquery function?

alice7
  • 3,764
  • 13
  • 61
  • 92

1 Answers1

0

Try using option:selected

 var y = $(this).find('option:selected').text();
 alert(y);
Sushanth --
  • 54,565
  • 8
  • 62
  • 98