I have an HTML select box called ddlLocation. When the value changes in the select box a change event javascript method gets fired. In the change event code, I want to assign the changed value to my ASP.NET variable called Model.Location.
I am trying to do this:
$("#ddlLocation").change(function (evt) {
<%Model.Location =%> $('#ddlLocation option:selected').text();<%; %>
});
It keeps crashing and saying "Cannot implicitly convert type 'void' to 'string'"
Please Help!!!