Kalfis Posted April 16, 2009 at 02:00 PM Report #257083 Posted April 16, 2009 at 02:00 PM Boas, tenho um pequeno problema, precissava de trespassar um codigo que esta em C# para VB, para poder funciar com ele em .aspx <% strPath = server.mappath("images/") Set DataList = CreateObject("ADODB.Recordset") DataList.Fields.Append "strFileName", 200, 255 ' adVarChar DataList.Fields.Append "strFileSize", 3, 4 ' adInteger DataList.Fields.Append "strFileDate", 7 ' adDate DataList.Open Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder(strPath) For Each objFile In objFolder.Files DataList.AddNew DataList("strFileName") = objFile.Name DataList("strFileSize") = Int(objFile.Size/1000) If DataList("strFileSize") = 0 Then DataList("strFileSize") = 1 DataList("strFileDate") = objFile.DateLastModified DataList.Update Next DataList.Sort = "strFile" & "Date" DataList.MoveFirst Do Until DataList.EOF strFile = DataList.Fields.Item("strFileName") strFileLG = Len(strFile) intPadding = 15 - strFileLG strDisplayName = strFile If NOT (strDisplayName = "inicio.jpg") Then response.write "<a class='highslide' href='images/" + strDisplayName + "' onclick='return hs.expand(this, inPageOptions)'><img src='images/" + strDisplayName + "'/></a>" End If DataList.MoveNext Loop %> se alguem conseguisse *.*
Alheira Posted April 16, 2009 at 02:02 PM Report #257085 Posted April 16, 2009 at 02:02 PM Deixa ver se percebi, queres passar de C# para VB? Mas o código que mostraste está em VB e não em C#. Cumps
jpaulino Posted April 16, 2009 at 02:05 PM Report #257087 Posted April 16, 2009 at 02:05 PM Olá, Isto não é C# é VB para ASP (designado agora como classic ASP). Tu queres é converter esse código para VB.NET para usares em ASP.NET. No entanto, e como as tecnologias já alteraram bastante, não podes simplesmente converter isso para VB.NET e ficar a funcionar. Vê o que precisas e é melhor re-fazer do que converter.
Kalfis Posted April 16, 2009 at 02:14 PM Author Report #257092 Posted April 16, 2009 at 02:14 PM pois, precisso de refazer isso para poder funcionar com ele em VB.net ... o problema é que não percebo la muito disto ... se alguem me conseguisse ajudar a refazer o codigo
bruno1234 Posted April 16, 2009 at 07:24 PM Report #257161 Posted April 16, 2009 at 07:24 PM Podes aproveitar a oportunidade para investir na aprendizagem de tecnologia mais recente ao VB. Como VB .NET e C# Matraquilhos para Android. Gratuito na Play Store. https://play.google.com/store/apps/details?id=pt.bca.matraquilhos
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now