zoukankan      html  css  js  c++  java
  • MVC4.0 里的分析器错误

    这种错误有很多,今天碰到了,代码段写在if里就回出错,应该是认冲了吧
                   

    @if (Web.Common.UserInfo.CurrentUserInfo != null)
                    {

            @{Web.ShoppingCart_Get SCG = new Web.ShoppingCart_Get(); string Number = SCG.Goods_ShoppingCart_GetNumber();}
                        <div style=" 118px; height: 32px; position: absolute; margin-top: 35px; margin-left: 882px;
                            z-index: 1;">
                            <a href="~/ShoppingCart/ShoppingCart">
                                <img src="http://images.cnblogs.com/gwc_bg.gif" width="118" height="32" border="0" /></a>
                                @Number
                        </div>
                    }

    下面这么写。

    @{Web.ShoppingCart_Get SCG = new Web.ShoppingCart_Get(); string Number = SCG.Goods_ShoppingCart_GetNumber();}

     @if (Web.Common.UserInfo.CurrentUserInfo != null)
    {       
    <div style=" 118px; height: 32px; position: absolute; margin-top: 35px; margin-left: 882px;
    z-index: 1;">
    <a href="~/ShoppingCart/ShoppingCart">
    <img src="http://images.cnblogs.com/gwc_bg.gif" width="118" height="32" border="0" /></a>
    @Number
    </div>
    }

    或者这么写

                   
                    @if (Web.Common.UserInfo.CurrentUserInfo != null)
                    {
                        Web.ShoppingCart_Get SCG = new TieCan.Web.ShoppingCart_Get(); string Number = SCG.Goods_ShoppingCart_GetNumber();
                        <div style=" 118px; height: 32px; position: absolute; margin-top: 35px; margin-left: 882px;
                            z-index: 1;">
                            <a href="~/ShoppingCart/ShoppingCart">
                                <img src="http://images.cnblogs.com/gwc_bg.gif" width="118" height="32" border="0" /></a>
                                @Number
                        </div>
                    }

  • 相关阅读:
    python 读取配置文件总是报错 configparser.NoSectionError: No section:
    接口测试面试题(转载)
    pytest文档1--简介及用例规则
    引以为戒,配置ChromeDriver 报错 'module' object is not callable
    截图+存储图片
    UI自动化(selenium+python)之浏览器驱动chromedriver安装和配置
    requests---requests封装请求类型
    工具学习_MarkDown
    python并发编程-多进程与多协程
    python并发编程-多线程同步异步处理
  • 原文地址:https://www.cnblogs.com/cuihongyu3503319/p/3148874.html
Copyright © 2011-2022 走看看