How to generate javascript function with the name taken from ViewBag? I'm trying the below
@{ (ViewBag.ModuleId + "DatePickerStartDateChange = function() {console.log('asdf');};");}
and hoping that it will emit javascript in the html output as
xxxxxxDatePickerStartDateChange = function() {alert("asdf");};