ok.. i now need to convert this
VB to C#:
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
''Get list of images
Dim dirInfo As New DirectoryInfo(Server.MapPath(""))
' Dim dirInfo As New DirectoryInfo(Request.PhysicalApplicationPath + "\\Images")
Dim images() As FileInfo = FilterForImages(dirInfo.GetFiles())
'Determine the current image to show
Dim imgIndex As Integer = 0
If Not Request.QueryString("N") Is Nothing AndAlso IsNumeric(Request.QueryString("N")) Then
imgIndex = CInt(Request.QueryString("N"))
End If
currentImgTitle.Text = "" & _
Right(Path.GetFileNameWithoutExtension(images(imgI ndex).Name),
Len(Path.GetFileNameWithoutExtension(images(imgInd ex).Name)) - 4) '& _
'" (" & imgIndex + 1 & " of " & images.Length & ")"
currentImg.ImageUrl = Path.GetFileName(images(imgIndex).Name)
If imgIndex > 0 Then
lnkPrev.NavigateUrl = "Default.aspx?N=" & imgIndex - 1
End If
If imgIndex < images.Length - 1 Then
lnkNext.NavigateUrl = "Default.aspx?N=" & imgIndex + 1
End If
dlIndex.DataSource = images
dlIndex.DataBind()
End Sub