2
Answers

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

Mike Jonson

Mike Jonson

12y
2k
1
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)