如何将.cs文件访问为.ascs.cs文件 [英] how to access an .cs file into .ascs.cs file

查看:113
本文介绍了如何将.cs文件访问为.ascs.cs文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 App_code 中声明了一个.cs文件,因为我已经在

i have declare an .cs file in App_code .In that I had declare an function with

"Internal" keyword

中声明了一个函数,但是我无法在 .ascx.cs 文件.但是我能够使用另一个 .cs文件

but i am not able to consume the function in my .ascx.cs file. but i am able to consume the same function another .cs file

推荐答案

相同的功能首先,为什么将其标记为internal?无论如何,该代码只能由包含它的站点访问.该类是否进一步标记为public?
First, why mark it as internal? The code can only be accessed by the site that contains it anyway. Further is the class marked as public?


这篇关于如何将.cs文件访问为.ascs.cs文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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