Mike Jonson

Mike Jonson

  • NA
  • 239
  • 193.8k

How to found price in DB by the id selected element use jquery?

May 5 2012 9:56 AM
Hi!

I have dropdown list with sizes (s, m, l...) When user select s, on view will show one price, when select m will another price. Ho do i implement this? I think need use jquery. Maybe you can show me example.

I do next:

$('#IdSize').change(function () {
        var price = "";
        var idSize = document.getElementById();
       
        price =...  
        })

I need get price from Table by IdSize. 

price = Model.Prices.Where((p=>p.IdSizes = idSize))

Inside jquery can be used razor?

Please help

Answers (2)