简体   繁体   English

MVC3 vb.net到C#WebGrid问题

[英]MVC3 vb.net to C# WebGrid issue

I'm rewritting some of the code from MVC4 C# to MVC3 vb.net (both razor engines) and I've came upon this issue... When I try to use the WebGrid I'm getting some syntax errors with "format:=". 我正在重写从MVC4 C#到MVC3 vb.net(两个剃刀引擎)的一些代码,我遇到了这个问题...当我尝试使用WebGrid时,我得到一些语法错误“格式: =”。 It seems that I can't get the syntax correctly. 似乎我无法正确获得语法。 This part of the code is faulty: 这部分代码有问题:

... grid.Column( ... grid.Column(

        format: 
             @<text> 
                @Html.ActionLink("Edit", "Edit", new { id=item.id })
             </text> 

            ),

... ...

Can somebody give me some advice or direction or help me? 有人可以给我一些建议或指导或帮助我吗? It's important to mention that everything else worked with WebGrid (columns etc.). 重要的是要提到其他一切都与WebGrid(列等)一起使用。 But I've tried to place the edit link to the grid like in the C# version (works like a charm there). 但我试图将编辑链接放在网格中,就像在C#版本中那样(就像魅力一样)。

@Rikon helped with his answer. @Rikon帮助他回答。

http://forums.asp.net/t/1664969.aspx/1 http://forums.asp.net/t/1664969.aspx/1

The whole issue was I was missing one "@", there should have been "@@". 整个问题是我错过了一个“@”,应该有“@@”。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM