你好,我看到了一些关于如何做到这一点的例子,但不幸的是我最终遇到了一个错误
**Description:** An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The server tag is not well formed.
我想使用下面的代码在放置在 Gridview 中的链接按钮上使用 javaquery:
<asp:LinkButton ID="hlHierarchy" runat="server" OnClientClick= "return windowpop('~/../../..<%#Eval("NavigateURL") %>', 545, 433)">
<pre Class="td-heading" style="display: inline; font-weight:bold"><%# ((string)Eval("Name")).Replace("-", " ") %></pre>
</asp:LinkButton>
如果有,请帮我纠正任何语法错误,下面是 jquery:
<script language="javascript" type="text/javascript">
function windowpop(url, width, height) {
var leftPosition, topPosition;
//Allow for borders.
leftPosition = (window.screen.width / 2) - ((width / 2) + 10);
//Allow for title and status bars.
topPosition = (window.screen.height / 2) - ((height / 2) + 50);
//Open the window.
window.open(url, "Window2", "status=no,height=" + height + ",width=" + width + ",resizable=yes,left=" + leftPosition + ",top=" + topPosition + ",screenX=" + leftPosition + ",screenY=" + topPosition + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no");
}
</script>