Re: Compiler Error Message: CS0138

  •  01-28-2009, 2:49 PM

    Re: Compiler Error Message: CS0138

    I found what I did wrong and solved my own problem.
     
    In developing the application, there are a dozen or so functions I wanted to use throughout the application. Without knowing a better way,  I created  a class file in App_Code,  made a namespace called Robintek (my company name) and placed within it a "Public Class Common" That class contained nothing but shared functions.
     
    Next, I added a line to web.config namespaces as follows:
    <add namespace="Robintek.Common"/>
     
     Having done that, I could now use any function in that class without having to write any additional code.
     
     The right way, I just discovered, is to create a class file in App_Code folder.  Within that file, rather than creating a public class with shared functions, I created a "Public Module".   By using Module rather than class, all the functions contained within it are available to the entire application. 
     
    I recoded the "Common" file as a module rather than a class, then removed the namespace line from Web.config.  My application works as it did before and now the CuteEditor does not error.
     
    Thanks for looking into this, but the problem was mine and not yours!
     
    Gary Jorgenson, RN
    President/CEO Robin Technologies
     
     
     

     

View Complete Thread