-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,834
  • 14
  • 64
  • 93

1 Answers1

0

Try using option:selected

 var y = $(this).find('option:selected').text();
 alert(y);
Sushanth --
  • 55,259
  • 9
  • 66
  • 105