i'm sorry if its a newbie question but can anyone tell me why can't I set a value of a var to a c# property ?
i am trying to find a way to use the value to retrieve some model properties & do a calculation .... 

```
@using System.Collections
@using System.Runtime.Serialization
@using CarRentalMVCApp.Models
@model CarRentalMVCApp.Models.Rentals

@functions {
    public string selection { get; set; }
    public decimal Price { get; set; }
}
@{
ViewBag.Title = "Create";
}

<script>

function select() {
    var $el = $("#selectedCar");
    var selected = $("#selectedCar option:selected").text();
    $el.on("change", @selection = selected);
    alert(@selection); 

}

function Rental() {

    var choice = select();
    @foreach (var car in ViewData["availableCars"] as IEnumerable<Vehicles>)
    {
        if (selection != null && int.Parse(selection) == car.מספר_רכב)
        {
            Price = car.עלות_ליום_השכרה;
        }
    }
    if (firstDay != null && lastDay != null) {
        var rentalData = {
            price: @Price,
            firstDay: $("#beginRental").val(),
            lastDay: $("#endRental").val()
        }
        alert(rentalData);
    }
}

</script>

```

the @selection always equals 0 and ones I try to set it with another veriable like so:

```
@selection = selected;

```

it remains 0 !!!

I also cant understand why I can't use any type of javascript variable if the @ sign is involved , would appresiate an explanation if you have the time or the links to help .....