代码隐藏文件中的visual studio命名空间

时间:2023-01-28 20:20:46

From some time whenever i download the webpages example from the Internet.In code behind file of .aspx page there is namespace mention before public partial class in some example.But it never worked for me. I'm using the vs2010 is this format used in previous version of Visual site and why vs2010 not support them.

从我有一次从Internet上下载网页示例。在.aspx页面的代码背后,在某些例子中公共部分类之前有名称空间提到。但它从来没有对我有用。我正在使用vs2010是在以前版本的Visual网站中使用的这种格式,以及为什么vs2010不支持它们。

Like in code behind file

就像代码背后的文件一样

namespace AutoCompleteTextBox
{
     public partial class AutoCompleteDemp : System.Web.UI.Page

1 个解决方案

#1


0  

Make sure your .aspx's <@page> directive has a matching Namespace:

确保.aspx的<@page>指令具有匹配的命名空间:

<%@ Page Title="Contact" Language="C#" AutoEventWireup="true" 
     CodeBehind="AutoCompleteDemp.aspx.cs" Inherits="AutoCompleteTextBox.AutoCompleteDemp " %>

#1


0  

Make sure your .aspx's <@page> directive has a matching Namespace:

确保.aspx的<@page>指令具有匹配的命名空间:

<%@ Page Title="Contact" Language="C#" AutoEventWireup="true" 
     CodeBehind="AutoCompleteDemp.aspx.cs" Inherits="AutoCompleteTextBox.AutoCompleteDemp " %>