我有最新版本的 AjaxControlToolkit,并且在 AjaxControlToolkit ReorderList 中使用了 AjaxControlToolkit Html Editor 控件。我需要能够访问“内容”属性,以便可以将值写入数据库,但 FindControl 找不到它。
例如,我可以在 ItemCommandEvent中找到一个TextBox 控件:
Protected Sub IncludedSectionComponentsReorderList_ItemCommand(ByVal sender As Object, ByVal e As AjaxControlToolkit.ReorderListCommandEventArgs) Handles IncludedSectionComponentsReorderList.ItemCommand
If e.CommandName = "SaveChanges" Then
Dim txtSectionComponentLabel As TextBox = CType(e.Item.FindControl("txtSectionComponentLabel"), TextBox)
End If End Sub
但我在同一事件中找不到AjaxControlToolkit Html 编辑器:
Protected Sub IncludedSectionComponentsReorderList_ItemCommand(ByVal sender As Object, ByVal e As AjaxControlToolkit.ReorderListCommandEventArgs) Handles IncludedSectionComponentsReorderList.ItemCommand
If e.CommandName = "SaveChanges" Then
Dim editor As Editor = CType(e.Item.FindControl("3Editor"), Editor)
strSectionControlValue = editor.Content
End If
End Sub