access static class from asp.net form
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.
精彩评论