Get value from dropdown list en use value in UrlHelper
I would try something like this, but it is not allowed.
function GetDynamicModulesProperties() {
var selectedValue = $("#moduletype option:selected").val();
if (selectedValue.lenght() > 0) {
var url = '<%= Url.Action("GetModuleProperties", new { sectionid = ViewData.Model.Id, moduleTypeId = selectedValue } ) %>';
var renderContainer = $("#modulesettings");
$.get(url, function(data) {
renderContainer.html(data);
renderContainer.fadeIn('slow');
});
}
}
Is there a way to do this?
Thanx in advance
+1
source to share