Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

ASP.NET (VB) Save Structure to file

hanzdolohanzdolo Posts: 1Member
I'm having an issue with saving Data structures to a web server easily.
With a Windows Application I would normally just:

Structure SiteUser

Dim Name as String
Dim Address as String
Dim Phone as String
Dim Email as String
Dim City as String
End Structure

Sub Whateverelse()
Dim SiteUsers(100000) as SiteUser

SaveFile()
End Sub


Sub SaveFile()

Dim i as integer
i = FreeFile()

FileOpen(i, F, OpenMode.Binary, OpenAccess.Write)
FilePut i, SiteUsers
FileClose(i)
End Sub

But that doesn't work for web applications. I've tried "Dim FileName as String = Server.MapPath("FileName.ext")" but that doesn't work either. There has got to be a better way than breaking everything down to a text file and using the stream writer/reader because it's just too slow that way.

Sign In or Register to comment.