【发布时间】:2018-05-15 13:38:38
【问题描述】:
我有一个 .net 项目,我一直在尝试使用 linkbutton,使其不会打开另一个页面/选项卡上的链接。目前我在另一个页面上打开了链接。
请帮忙。
我的ascx页面代码如下:
<td>
<asp:LinkButton ID="ApproveButton" runat="server" Text="Approval" CssClass="btn btn-primary btn-xs" OnClientClick="window.open('/Licence-Application/Applicant-Approval-Page');"/>
</td>
我试过window.open、window.show、Response.Redirect、window.location、location.href,但没有成功。
要么是一直打开同一个页面,要么是出现错误,要么是在新标签页上打开。
【问题讨论】:
-
您能告诉我们更多您在尝试
location.href时遇到的错误吗? -
以下是我在使用 'location.href' 时遇到的错误 '错误:已注册的申请人列表当前不可用。 DotNetNuke.Services.Exceptions.ModuleLoadException:服务器标签格式不正确。 ---> System.Web.HttpParseException:服务器标签格式不正确。 ---> System.Web.HttpException:服务器标签格式不正确。在 System.Web.UI.TemplateParser.ProcessError(String message) 在 System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) 在 System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding )'