to display data in a grid view on my page.开发者_Python百科 MyFormatClass works fine, but now I want to move it to a central location that can b" />
开发者

access static class from asp.net form

开发者 https://www.devze.com 2022-12-30 07:45 出处:网络
I am using <%# MyFormatClass(Eval(\"fieldname\")) %> to display data in a grid view on my page.开发者_Python百科 MyFormatClass works fine, but now I want to move it to a central location that can b

I am using <%# MyFormatClass(Eval("fieldname")) %> to display data in a grid view on my page.开发者_Python百科 MyFormatClass works fine, but now I want to move it to a central location that can be used by many pages. When I try to access the class <%# Utils.MyFormatClass(Eval("fieldname")) %> it no longer works. Is this something we are allowed to do?


As you don't provide much information this is just a guess, but maybe you need simply to put your Utils class in your App_Code folder; all the code there will be compiled to an assembly that is available to all your pages.

0

精彩评论

暂无评论...
验证码 换一张
取 消