最好在application定义全局变量

解决方案 »

  1.   

    当然可以..
    public const string strtemp ="http://192.168.1.88/";放在一个类里面..
    public class Constant
    {
    public const string strtemp ="http://192.168.1.88/";
    }
    用的时候Constant.strtemp 
      

  2.   

    楼上两位,我就是用你们楼上的方法遇到这个问题,你们用过应用程序池web园里的多进程没有
      

  3.   

    一个常量而已..要加上const 关键字
      

  4.   

    在一个类里写public static string strtemp ="http://192.168.1.88/"; 
    到时调用:  类.strtemp