Hi everyone!
I need a quick hand figuring out what this code is doing, and how to make it work in vb.net
<%=Html.PageLinks((int(ViewData["CurrentPage"], (int)ViewData["Totalpages"], x=> Url.Action("List", new {page = x})) %>
i've figured out most of it. but the x=>Url.Action("List", new {page = x}) part is throwing me off. I tried reading about lamdas and such but i'm not quite getting it.
the pagelinks is defined like this:
_
Public Function PageLinks(ByVal html As HtmlHelper, ByVal currentPage As Integer, ByVal totalPages As Integer, ByVal pageUrl As Func(Of Integer, String)) As String
Dim result As New StringBuilder
For i As Integer = 1 To totalPages
Dim tag As New TagBuilder("a")
tag.MergeAttribute("href", pageUrl(i))
tag.InnerHtml = i.ToString
If i = currentPage Then
tag.AddCssClass("selected")
End If
result.AppendLine(tag.ToString())
Next
Return result.ToString
End Function
which i THINK is the correct conversion from c#.
Thanks in advance!
Patricia