loginstatus链接出错 [英] Error on loginstatus Link

查看:123
本文介绍了loginstatus链接出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有



每当我点击页面上的注销链接时,我都会收到以下错误



编译器错误消息:CS1061:'ASP.newsmastermaster_master'不包含'unnamed_loggingout'的定义,并且没有可以找到接受ASP.newsmastermaster_master类型的第一个参数的扩展方法'unnamed_loggingout'(你是否缺少using指令?或汇编参考?)





loginstatus链接如下



< asp:loginstatus runat =serverlogoutaction =redirectlogouttext =log offlogoutpageurl =〜/ Account / Login.aspxonloggingout =unnamed_loggingout/>



请告诉我如何修复它?



问候

Dear All

I am getting the following error whenever I hit the logoff link on my page

Compiler Error Message: CS1061: 'ASP.newsmastermaster_master' does not contain a definition for 'unnamed_loggingout' and no extension method 'unnamed_loggingout' accepting a first argument of type 'ASP.newsmastermaster_master' could be found (are you missing a using directive or an assembly reference?)


the loginstatus link is as follows

<asp:loginstatus runat="server" logoutaction="redirect" logouttext="log off" logoutpageurl="~/Account/Login.aspx" onloggingout="unnamed_loggingout" />

please tell me how to fix it?

Regards

推荐答案

您需要在您的aspx代码后面的方法中使用签名方法,如下所示

you need to have method in your aspx code behind file with signature as below
void unnamed_loggingout(Object sender, System.Web.UI.WebControls.LoginCancelEventArgs e)
    {
        //do something ...
    }


这篇关于loginstatus链接出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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