if you bind model to view you will get the selected value directly in controller
(without binding the model also we can achieve the selected value from ajax hit)
1.tell me few things have you bind any model to the view in which your dropdown exist.?
2. did you write post action method in controller?
//in view
<% using (Html.BeginForm())
{ %>
<%=Html.DropDownListFor(m => m.CourseId, new SelectList((ViewBag.Courses) as SelectList, "Value", "Text"), "Select")%>
<input id="submit" type="button" value="Save" name="submit" />
<%} %>
//in document.ready
$("#submit").live("click", function (e) {
e.preventDefault();
var data = JSON.stringify({ CourseId: $('#CourseId').val()});
$.ajax({
type: "POST",
url: config.basePath + '/Controllername/ActionMethodName',
cache: false,
data: data,
dataType: this.dataType,
contentType: "application/json; charset=utf-8",
success: function (result) {
if (result.IsSuccess) {
$("#error_message").html(result.ErrorMessage);
$("#error_message").addClass("success");
UTMSGrid.StudentCourses.List.bindGrid($("#grid"));
}
else {
$("#error_message").html(result.ErrorMessage);
$("#error_message").addClass("fail");
}
},
error: function (data) {
}
});
});
//in controller
[HttpPost]
public JsonResult ActionMethodName(ModelName model)
{
int id= model.CourseId
return Json(id, JsonRequestBehavior.AllowGet);
}