SyntaxFix
Write A Post
Hire A Developer
Questions
You can achieve the solution, by doing this:
JavaScript:
var myValue = document.getElementById("@(ViewBag.CC)").value;
or if you want to use jQuery, then:
jQuery
var myValue = $('#' + '@(ViewBag.CC)').val();