ASP.net中的命名空间问题 [英] namespace problem in ASP.net

查看:132
本文介绍了ASP.net中的命名空间问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在我的项目中,我在code_app文件夹中有CS文件
我在项目的特定文件夹内有一个网页文件,称为操作员文件夹
我想从我的网页调用在code_app文件夹内的cs文件中找到的特定方法
但是当我尝试编写包含该方法的类名时,它不会在代码页中对我显示

如果有人了解我,请回答我
对我来说是大问题

如果有人需要更多有关我的问题的解释,请告诉我

Hi every body,

In my project that i have cs file inside code_app folder
and i have web page file inside specific folder in the project called Operator folder
I want to call specific method found in cs file inside code_app folder from my web page
but when i try to write the class name that contain the method it not appear for me in code page

If any one understand me please answer me
It is big problem for me

If any one need more explain about my problem pleaase tell me

推荐答案

请确保以下内容:

1. App_Code文件夹中的类(cs文件)将进行编译.
2.班级是public.
3.如果该类具有名称空间,请确保使用"using"语句将其导入到代码隐藏文件中. 4.确保类文件的方法为public.

希望您的问题能够得到解决.
Make sure the following things:

1. The class (cs file) inside the App_Code folder compiles.
2. The class is public.
3. If the class has a namespace, make sure it is imported in the codebehind file with the "using" statement.
4. Make sure the methods of the class file are public.

Hopefully, your problem will be resolved.


正如您在此问题的主题中恰当提到的那样,网页中包含的名称空间是.如果它们是单独的dll,是否添加了dll参考?
As you have so aptly mentioned in the subject of this question, is the namespace included in the web page. If they are separate dll''s, is the dll reference added?


这篇关于ASP.net中的命名空间问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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