如何从aspx页面中删除无效表达式')'错误 [英] How can I remove the Invalid expression ')' error from aspx page

查看:87
本文介绍了如何从aspx页面中删除无效表达式')'错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< asp:HyperLink ID =Log_OutOnLoad =GoToLoginPage(); runat =server> [Log Out]

<asp:HyperLink ID="Log_Out" OnLoad="GoToLoginPage();" runat="server">[Log Out]

推荐答案

您好Pramod_007,您正在使用服务器控件,因此您必须在那里调用服务器事件:

Hi Pramod_007, you're using a server control, so you must call to a server event there:
<asp:hyperlink id="Log_Out" onload="GoToLoginPage" runat="server" xmlns:asp="#unknown">
</asp:hyperlink>



所以,在你的代码背后(C#,在这种情况下)你会有这样的东西:


So, in your code behind (C#, in this case) you will have something like this:

private void GoToLoginPage(object sender, EventArgs e)
{
    //Redirect to your desired page
}



你的问题很简单,但我认为这就是你要找的。



希望它有所帮助。


Your question is so simple, but I think that is it that you looking for.

Hope it helps, any way.

尝试< asp:hyperlink id =Log_Outonload =return GoToLoginPage(); runat =serverxmlns:asp =#unknown> [Log Out]< / asp:hyperlink>


< asp:hyperlink id =Log_Outonload =GoToLoginPage(); runat =serverxmlns:asp =#unknown> [退出]



修改如下



< asp:hyperlink id =Log_Outonload =GoToLoginPagerunat =server> [退出]
<asp:hyperlink id="Log_Out" onload="GoToLoginPage();" runat="server" xmlns:asp="#unknown">[Log Out]

Modify as below

<asp:hyperlink id="Log_Out" onload="GoToLoginPage" runat="server">[Log Out]


这篇关于如何从aspx页面中删除无效表达式')'错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆