我发誓我与微软有着爱恨交织的关系。这仅在 IE 10 中抛出。
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/>
现在,
在@page 我有 ValidateRequest = "False"
在 Web.config 我有 httpRuntime requestValidationMode="2.0"
我没有使用任何 Ajax 或有 ScriptManager
我正在检查 PostBack
删除了组合框代码,但它确实使用了 AutoPostBack
这是我的代码
Private Sub Page_Init(sender As Object, e As EventArgs) Handles Me.Init
Try
Dim User As New UserRole(Me.SiteID, Master.UserName)
If User.GetLevel(Permissions.Edit) >= Levels.Page Then
Exit Sub
End If
Catch ex As Exception
End Try
Response.Redirect("/Manage/Errors/Unauthorized.aspx")
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Me.IsPostBack = True Then
Exit Sub
End If
Try
Dim Item As New PageBase(Me.PageID)
Me.txtCode.Text = Item.Code
Catch ex As Exception
Master.ShowError("Flex encountered a problem reading this page.")
End Try
End Sub
Private Sub cmbSnippet_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbSnippet.SelectedIndexChanged
If Me.cmbSnippet.SelectedIndex = 0 Then
Exit Sub
End If
Try
Dim Filename As String = String.Format("/Manage/Editors/Text/Scripts/{0}", Me.cmbSnippet.SelectedValue)
Me.txtCode.Text = My.Computer.FileSystem.ReadAllText(Server.MapPath(Filename))
Exit Sub
Catch ex As Exception
End Try
Master.ShowError("Flex encountered a problem reading the snippet.")
End Sub
Private Sub btnOk_Click(sender As Object, e As EventArgs) Handles btnOk.Click
Try
Dim Item As New PageBase(Me.PageID)
Item.Code = Me.txtCode.Text
If Item.Update = True Then
Me.ShowUpdateTime()
Exit Sub
End If
Catch ex As Exception
End Try
Master.ShowError("Flex encountered a problem modifying this page.")
End Sub
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
Response.Redirect(String.Format("/Manage/Preview.aspx?PageID={0}", Me.PageID))
End Sub