Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hello

following code snippet always gives error.
XML
@*  @grid.GetHtml(columns:
grid.Columns
       (

       grid.Column("Name","Stud Name"),
       grid.Column("Marks","Marks"),
       grid.Column("Section","Section"),
       grid.Column("Address","Address"),
//Error start here (Red line in vs 2012) not recognizes the razor syntax
       grid.Column("",null,format: @ @{ <a href ="/Student/Edit/?StuId = @item.id">Edit</a>}


       grid.Column("", null, format: @ @{<a href="/Student/Delete/?stuId=@item.Id">Delete</a>}
       )
                  ).mode : WebGridPagerModes.Numeric)*@
Posted
Comments
Member 11390850 31-Jan-15 8:27am    
code snippet is this;

<div>
@grid.GetHtml(columns:
grid.Columns
(
grid.Column("Name", "Stud Name"),
grid.Column("Marks", "Marks"),
grid.Column("Section", "Section"),
grid.Column("Address", "Address"),
grid.Column("", null, format: @@{Edit}
),
grid.Column("", null, format: @@{Delete}
)
), mode: WebGridPagerModes.Numeric)
</div>
LLLLGGGG 1-Feb-15 4:27am    
Please, use the button 'Improve Solution' amd write the code inside your solution instead of inside s comment. Nobody can see it at the first sight and comments are not built for this purpose, therefore your code is not formatted nor indented. Anyway, you forgot to mention what kind of error it is throwing... A logical one, a syntax one? What is its description?
CHill60 31-Jan-15 9:27am    
What is the exact error?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900