asp.Net does not exist in current context

后端 未结 10 1829
夕颜
夕颜 2021-02-07 08:39

I am facing a small big problem. I have taken a dropdownList control and ID is \"drpDownCountries\" in ASP.Net project. The problem is that \"The dropdownlist contr

10条回答
  •  猫巷女王i
    2021-02-07 09:20

    So first check that your ascx document is defined like so

    ExampleClass.ascx

        <%@ Control Language="C#" AutoEventWireup="true" CodeFile="ExampleClass.ascx.cs" Inherits="ExampleClass" %>
    

    ExampleClass.ascx.cs

    public partial class ExampleClass : System.Web.UI.UserControl
    {
         protected void Page_Load(object sender, System.EventArgs e)
        {
    
        }
    }
    

提交回复
热议问题