简体   繁体   中英

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:=". It seems that I can't get the syntax correctly. This part of the code is faulty:

... 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.). But I've tried to place the edit link to the grid like in the C# version (works like a charm there).

@Rikon helped with his answer.

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

The whole issue was I was missing one "@", there should have been "@@". :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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