我正在尝试使用 WebForms 从盒式磁带中编写这种风格的代码。这可能吗?
@{
var message = "Hello World!";
Bundles.AddInlineScript(
@<script>
if (someTest) {
alert('@message');
}
</script>);
}
Func<Object, Object>
我还没有找到在 WebForms中使用带有参数的方法的示例。或者这是因为只有 Razor 视图引擎才允许这样做?