简体   繁体   中英

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 . I trying to create a checkbox that when checked or unchecked displays a label Updated for 1 second then fades out. 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.

<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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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