Sure. I should have made that clear. You would still need to do something like "using MyCustomNamespace" or what not.
- dave -----Original Message----- From: Jeff Gonzalez [mailto:[EMAIL PROTECTED]] and you cant really make it intrinsic. You would still have to use if (Utils.IsNullOrEmpty) {} syntax. ----Original Message Follows---- From: "David L. Penton" <[EMAIL PROTECTED]> ...and make these into a separate assembly either in your /bin directory or if you have more control over your server...in the GAC and make the necessary adjustments in your machine config to let your ASP.Net worker process be aware of the assembly. -----Original Message----- From: Robert Chartier [mailto:[EMAIL PROTECTED]] Do something like this: namespace YourOrg { public class Utils { public static bool IsNullOrEmpty(object val) { return (val==null || val==""); } } } Notice the keyword static -----Original Message----- From: Gerald de Bueger [mailto:[EMAIL PROTECTED]] Hi all, I'm new to .net and want to learn how to do stuff I did in asp in ASP.Net In classic asp, I include huge file at the top of each page. Those files contain usefull functions. For instance, I've got a function called isNullOrEmpty. So in the page I can just say: if isNullOrEmpty(sValue) then .... What would be the best way to do that in .net. I'd like to access the function directly without having to declare it first. Like if it was a c# intinsec function as toString() for instance. In other words, is there a way to get the same functionnality as an include but in a more powerfull maner? Thanks for your help. I hope I was clear enough. Gerald --- You are currently subscribed to dotnet as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] --------- Administrated by 15 Seconds : http://www.15Seconds.com List Archives/Search : http://local.15Seconds.com/search Subscription Information : http://www.15seconds.com/listserv.htm Advertising Information: http://www.internet.com/mediakit/
