简体   繁体   English

当前位置无可用资源

[英]There is no source available for the current location

There is no source available for the current location.What does that mean and how do I fix the problem. 当前位置没有可用的资源。这意味着什么以及如何解决此问题。 Here is my code-behind.cs . 这是我的code-behind.cs I trying to create a checkbox that when checked or unchecked displays a label Updated for 1 second then fades out. 我试图创建一个复选框,当选中或取消选中该复选框时,它会显示一个标签Updated 1秒,然后淡出。 Functionality is if the user checks or unchecks the checkbox the label is displayed then fades out, please see code I having trouble getting this functionality. 功能是,如果用户选中或取消选中显示标签的复选框,然后淡出,请参阅代码我在获取此功能时遇到问题。

protected void chkDefault_CheckedChanged(object sender, EventArgs e)
    {
        if (chkDefault.Checked == false)
        {
            lblAdmin.Visible = false;
            txtProfileName.Visible = true;
        }
        if (chkDefault.Checked == true)
        {
            lblAdmin.Visible = true;
            txtProfileName.Visible = false;
            txtProfileName.Text = "";
        }
        Update();
    }

    private void Update()
    {
        myLabel.Text = "Updated!";
        UpdatePanel1.Update();
    }
}

Here is the HTML that goes with it. 这是附带的HTML

<script type="text/javascript">
    $(function() {
        setTimeout(function() {
            fadeText();
            }, 1500);

            function fadeText() {
                $("#<%=myLabel.ClientID%>").fadeOut("slow");
            }
        }); 
</script>

<asp:UpdatePanel ID="UpdatePanel1" runat="server"  UpdateMode="Conditional">
    <ContentTemplate>
        <asp:CheckBox ID="chkDefault" runat="server" Text="Default" Checked="true" 
            width="150px" oncheckedchanged="chkDefault_CheckedChanged" 
            AutoPostBack="true"/>
        <asp:Label ID="myLabel" runat="server" CssClass="fadeLabel"></asp:Label>
    </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanelAnimationExtender ID="UpdatePanelAnimationExtender1" runat="server" 
    BehaviorID="animation" TargetControlID="UpdatePanel1">
        <Animations>
            <OnUpdated>
                <Sequence>
                    <ScriptAction Script="fadeOut()"></ScriptAction>
                </Sequence>
            </OnUpdated>
        </Animations>
</asp:UpdatePanelAnimationExtender>

It means you're attempting to step-into a piece of code (a function) which is located in an executable file (an exe or dll) that you don't have the source code for - usually this is when you're working inside a callback function and you press Step-out which would return you to the parent function, but the parent to the callback is in a Windows or .NET Framework assembly, which you won't have the source code for. 这意味着您正在尝试进入您没有源代码的可执行文件(exe或dll)中的一段代码(一个函数),通常是在工作时在回调函数中,然后按“逐步退出”,这将使您返回父函数,但回调的父级位于Windows或.NET Framework程序集中,而您没有源程序。

It's usually just benign and means you need to watch where (and what) you're debugging. 它通常只是良性的,意味着您需要注意调试的位置(和内容)。 Click "OK" and press Continue (F5) until something bad happens. 单击“确定”,然后按继续(F5),直到发生问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM