Click here to Skip to main content
15,883,883 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
For edit from a grid i have created a partial class and i have dropdownlist in partial class how do i bind my model values to dropdownlist?

So i thought i can do it through JQuery but my Jquery is not firing

I have added jquery script to the view

My code

@model E_Commerce_Admin.Models.Product


JavaScript
script type="text/javascript">
   
    $(function () {
        
        $(Status).val('test');
        $('#SalesPrice').blur(function () {
            var amt = parseFloat(this.value);
            $(this).val(amt.toFixed(2));
        });     

    });



JavaScript
@section Scripts {
    
@Scripts.Render("~/bundles/jquery")
 
}


$( document ).ready() is also not firing
Posted
Comments
Nathan Minier 19-Nov-14 7:46am    
Make sure you haven't included jQuery twice.
Jameel VM 21-Nov-14 7:00am    
select view source in browser and make sure that jquery file is loaded or not in browser.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900