152
rated 0 times
[
156]
[
4]
/ answers: 1 / hits: 161411
/ 12 Years ago, thu, february 14, 2013, 12:00:00
Can someone format the code below so that I can set srcript variables with c# code using razor?
The below does not work, i've got it that way to make is easy for someone to help.
@{int proID = 123; int nonProID = 456;}
<script type=text/javascript>
@{
<text>
var nonID =@nonProID;
var proID= @proID;
window.nonID = @nonProID;
window.proID=@proID;
</text>
}
</script>
I am getting a design time error
More From » c#