联系我们

为客户提供超预期的高品质网站设计!

在同一个空间里,根据不同域名对应不同的网站的开发

2018-12-11 0:00:00

 asp.net

url= HttpContext.Current.Request.Url.Host;

 switch (url)
        {
            case "www.maolian.net":
                qianZhui = "上海";
                    break;
            case "www.qingpu.maolian.net":
                    qianZhui = "青浦";
                    break;
            case "www.songjiang.maolian.net":
                    qianZhui = "松江";
                    break;
            case "www.changning.maolian.net":
                    qianZhui = "长宁";
                    break;


            case "www.baoshan.maolian.net":
                    qianZhui = "宝山";
                    break;
            case "www.fengxian.maolian.net":
                    qianZhui = "奉贤";
                    break;
            case "www.hongkou.maolian.net":
                    qianZhui = "虹口";
                    break;
            case "www.huangpu.maolian.net":
                    qianZhui = "黄埔";
                    break;
            case "www.jiading.maolian.net":
                    qianZhui = "嘉定";
                    break;
            case "www.jinshan.maolian.net":
                    qianZhui = "金山";
                    break;
            case "www.jingan.maolian.net":
                    qianZhui = "静安";
                    break;
            case "www.luwan.maolian.net":
                    qianZhui = "卢湾";
                    break;
            case "www.minhang.maolian.net":
                    qianZhui = "闵行";
                    break;
            case "www.nanhui.maolian.net":
                    qianZhui = "南汇";
                    break;
            case "www.pudong.maolian.net":
                    qianZhui = "浦东";
                    break;
            case "www.putuo.maolian.net":
                    qianZhui = "普陀";
                    break;
            case "www.xuhui.maolian.net":
                    qianZhui = "徐汇";
                    break;
            case "www.yagnpu.maolian.net":
                    qianZhui = "杨浦";
                    break;
            case "www.zhabei.maolian.net":
                    qianZhui = "闸北";
                    break;


            default:
                    qianZhui = "上海";
                    break;

        }

上一条新闻:.net post中文参数 utf-8 编码
下一条新闻:asp.net 母版嵌套,更新title内容

 

4008-520-214 54057491 info@maolian.net