FreeTextBox

The no. 1 free ASP.NET HTML Editor.
Welcome to FreeTextBox Sign in | Join | Help
in Search

Sending file inline

Last post 07-02-2008, 4:16 PM by Ross Holland. 2 replies.
Sort Posts: Previous Next
  •  11-29-2006, 4:12 PM 7655

    Sending file inline

    I am new to .Net and have been trying to figure out how to send a file to FreeTextBox that is already on the web server. So far I have tried to StreamRead the file into FreeTextBox without any luck. Basically I am trying to let a certain user edit his file online and save changes to the file. Any help would be great.
  •  11-30-2006, 11:33 PM 7677 in reply to 7655

    Re: Sending file inline

    solved my own problem with this code.

    Private Sub ReadFile()

    Dim reader1 As New StreamReader(Me.sFile)

    Dim text1 As String = reader1.ReadToEnd

    reader1.Close

    Me.ftbEdit.Text = text1

    End Sub

    Private Sub WriteFile()

    Dim writer1 As New StreamWriter(Me.sFile)

    writer1.WriteLine(Me.ftbEdit.Text)

    writer1.Close

    End Sub

  •  07-02-2008, 4:16 PM 9259 in reply to 7677

    Re: Sending file inline

    Goroth, you are a genius to post this code. I'm only sorry it took me 3 days to find it! I did find lots of posts asking for just this answer, and was almost tempted to post my own in the hope I was missing something.

    I am tempted to post this back on again with a new title, with a link to your post in case there are any other poor newbies out there just trying to load an html page into their freetextbox and save it afterwards...

    Cheers - you've saved my sanity

    Ross

View as RSS news feed in XML
www.freetextbox.com