【发布时间】:2019-06-27 14:56:09
【问题描述】:
我有一个视图,想在其中执行一些控制器方法。
第一种方法在选择标签内添加选项;
绑定到按钮的第二种方法执行我需要的过程;
我尝试了很多来自谷歌的选项,但它甚至不允许我尝试它们。无论我尝试用它做什么,它都会显示Unterminated string literal.。
看起来像这样:
<!DOCTYPE html>
<html>
<head runat="server">
<title>Choose language to upload .html files</title>
</head>
<body>
<form">
<div>
<h1>Choose language to upload .html files</h1>
<select>
/*After page is loaded, method from a controller will add options*/
</select>
</div>
<button>Start</button> /*Another method from a controller will be bound to this button*/
</form>
</body>
</html>
【问题讨论】:
-
@KevinLamb 我试过了,它显示了我在主题中提到的错误。
-
你能在视图中展示你调用方法的方式吗?
-
@KevinLamb 添加截图
-
有什么理由需要 location.href 吗?