Imports Ganss.XSS Partial Class admin_InputBox Inherits System.Web.UI.Page Public laenderkuerzel As String = "de" Public menueId As Integer = 1 Private DB As New cDBADMINFunctions Dim hp_content As hp_content = Nothing Public Overrides Sub VerifyRenderingInServerForm(control As Control) End Sub 'PreviousPage ???? Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then 'ERSTES MAL Page.Session("parentReload") = Nothing Page.Session("close") = Nothing ' Page.Session("navParent") = "admin" If Not Request.QueryString("lan") Is Nothing Then laenderkuerzel = Request.QueryString("lan") Else laenderkuerzel = "de" End If ' Dim arrayoftags(5) As String 'arrayoftags(0) = "a" 'arrayoftags(1) = "div" 'arrayoftags(2) = "iframe" 'Dim arrayofattrs(20) As String 'arrayofattrs(0) = "a" 'Dim uriattributes(5) As String 'uriattributes(0) = "Par1" 'Dim allowedcssprops(15) As String 'allowedcssprops(0) = "" 'Dim sanitizer = New HtmlSanitizer(arrayoftags, Nothing, arrayofattrs, uriattributes, allowedcssprops) 'Dim cleanHtml As String 'sanitizer.AllowDataAttributes = True If Not Request.QueryString("menuID") Is Nothing Then menueId = Request.QueryString("menuID") Else menueId = 1 End If hp_content = DB.qry_contentNew(menueId, laenderkuerzel) 'cleanHtml = sanitizer.Sanitize(hp_content.ToString) Page.Session("hp_content") = hp_content End If End Sub Protected Sub addPage_Click(sender As Object, e As EventArgs) Handles addPage.Click Dim hp_content As hp_content = Nothing hp_content = Page.Session("hp_content") 'sonst gehs ned, weil werte nicht geladen sind ' Dim title = InputBox("Bitte geben Sie den deutschen Menü-Titel an:") ' System.Web.HttpContext.Current.Response.Write("") Dim title As String = input.Text If title <> "" Then 'Request.QueryString("menuID") Dim menueId As Integer = -1 menueId = DB.insert_HPContentNew(hp_content, laenderkuerzel, title, hp_content.hp_id, hp_content.hp_instance) 'Page.Parent.Page.Response.Redirect("admin.aspx?menuId=" & menueId & "&lan=" & laenderkuerzel) Page.Session("parentReload") = "admin.aspx?menuID=" & menueId & "&lan=" & laenderkuerzel Else MsgBox("Der Titel darf nicht leer sein!") End If End Sub End Class