@Html.DisplayText will not actually display text

前端 未结 4 1113
一生所求
一生所求 2021-01-03 19:51

The following is the first section in the first row of a table on one of my ASP MVC3 Index pages. I\'ve stepped through the code when that page loads, and can see that the

4条回答
  •  难免孤独
    2021-01-03 20:21

    use @: or to specify html text inside a server side code if you do not have any other html in there.

    if (item.TableName.Equals("AgentContEd"))
    {
        @:CE
    }
    else if (item.TableName.Equals("AgentProductTraining"))
    {
        PT
    }
    

提交回复
热议问题