You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.1 KiB
28 lines
1.1 KiB
Imports System.IO
|
|
Public Class OptionTextEditor
|
|
Inherits System.Web.UI.Page
|
|
|
|
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
|
|
If Not Page.IsPostBack Then
|
|
Dim dh As New clsDatahandling
|
|
Dim s As String = dh.Get_Option(8)
|
|
FileOpen(1, Server.MapPath("~/temp") + "\8.rtf", OpenMode.Output)
|
|
WriteLine(1, s)
|
|
FileClose(1)
|
|
Using writer As StreamWriter = New StreamWriter(Server.MapPath("~/temp") + "\8.rtf")
|
|
writer.Write(s)
|
|
writer.Flush()
|
|
writer.Close()
|
|
End Using
|
|
Me.Editor1.LoadRTF(Server.MapPath("~/temp") + "\8.rtf")
|
|
End If
|
|
End Sub
|
|
|
|
|
|
Private Sub Editor1_SaveButtonClick(sender As Object, e As EventArgs) Handles Editor1.SaveButtonClick
|
|
Dim htmltortf = New RTE.Convertor.RTF.HTML2RTF(Me.Editor1.Text)
|
|
Dim dh As New clsDatahandling
|
|
dh.UpdateTable("Optionen", "Inhalt", htmltortf.RTF.ToString, True, "optionnr", 8)
|
|
End Sub
|
|
|
|
End Class |