1 | <%@ Page Language="VB" %> |
---|
2 | <%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %> |
---|
3 | <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> |
---|
4 | |
---|
5 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
6 | |
---|
7 | <script runat="server"> |
---|
8 | |
---|
9 | |
---|
10 | |
---|
11 | Protected Sub lbtnManage_Click() Handles lbtnManage.Click |
---|
12 | fvTest.ChangeMode(FormViewMode.Edit) |
---|
13 | fvTest.DataBind() |
---|
14 | End Sub |
---|
15 | |
---|
16 | Protected Sub lbtnNormal_Click() Handles lbtnNormal.Click |
---|
17 | fvTest.ChangeMode(FormViewMode.ReadOnly) |
---|
18 | fvTest.DataBind() |
---|
19 | End Sub |
---|
20 | |
---|
21 | |
---|
22 | |
---|
23 | Protected Sub lbtnManage1_Click() Handles lbtnManage1.Click |
---|
24 | fvTest1.ChangeMode(FormViewMode.Edit) |
---|
25 | fvTest1.DataBind() |
---|
26 | End Sub |
---|
27 | |
---|
28 | Protected Sub lbtnNormal1_Click() Handles lbtnNormal1.Click |
---|
29 | fvTest1.ChangeMode(FormViewMode.ReadOnly) |
---|
30 | fvTest1.DataBind() |
---|
31 | End Sub |
---|
32 | |
---|
33 | </script> |
---|
34 | |
---|
35 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
36 | <head runat="server"> |
---|
37 | <title>Untitled Page</title> |
---|
38 | </head> |
---|
39 | <body> |
---|
40 | <form id="form1" runat="server"> |
---|
41 | <div> |
---|
42 | <asp:ScriptManager ID="scriptManager1" runat="server"></asp:ScriptManager> |
---|
43 | <asp:UpdatePanel ID="updPage" runat="server"> |
---|
44 | <ContentTemplate> |
---|
45 | |
---|
46 | <div style="border:solid 1px black;"> |
---|
47 | <b>Does work:</b><br /> |
---|
48 | <asp:SqlDataSource ID="sdsTest" runat="server" ConnectionString="<%$ ConnectionStrings:csBeugen %>" |
---|
49 | SelectCommand="select 1 as pageId, 'test' as text, 'titel' as titel" SelectCommandType="Text" > |
---|
50 | </asp:SqlDataSource> |
---|
51 | |
---|
52 | <asp:LinkButton ID="lbtnNormal" runat="server" Text="Bekijk online" /> |
---|
53 | <asp:LinkButton ID="lbtnManage" runat="server" Text="Content bewerken" /> <br /> |
---|
54 | |
---|
55 | <asp:FormView ID="fvTest" runat="server" DataSourceID="sdsTest" DataKeyNames="pageid"> |
---|
56 | <ItemTemplate> |
---|
57 | <asp:Label ID="lblTitel" runat="server" Text='<%# Eval("titel") %>' EnableViewState="false" CssClass="titel" /> |
---|
58 | <asp:Label ID="lblContent" runat="server" Text='<%# Eval("Text") %>' EnableViewState="false" /> |
---|
59 | </ItemTemplate> |
---|
60 | <EditItemTemplate> |
---|
61 | <div class="listSection"> |
---|
62 | <FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" BasePath = "~/fckeditor/" EditorAreaCSS="~/hfiles/all.css" Width="600" ToolbarSet="Beugen" Value='<%# Bind("Text") %>' /> |
---|
63 | </div> |
---|
64 | </EditItemTemplate> |
---|
65 | </asp:FormView> |
---|
66 | |
---|
67 | </div> |
---|
68 | |
---|
69 | <br /> |
---|
70 | |
---|
71 | <div style="border:solid 1px black;"> |
---|
72 | <b>Does not work:</b><br /> |
---|
73 | <asp:SqlDataSource ID="sdsTest1" runat="server" ConnectionString="<%$ ConnectionStrings:csBeugen %>" |
---|
74 | SelectCommand="select 1 as pageId, '<p>test</p>' as text, 'titel' as titel" SelectCommandType="Text" > |
---|
75 | </asp:SqlDataSource> |
---|
76 | |
---|
77 | <asp:LinkButton ID="lbtnNormal1" runat="server" Text="Bekijk online" /> |
---|
78 | <asp:LinkButton ID="lbtnManage1" runat="server" Text="Content bewerken" /> <br /> |
---|
79 | |
---|
80 | <asp:FormView ID="fvTest1" runat="server" DataSourceID="sdsTest1" DataKeyNames="pageid"> |
---|
81 | <ItemTemplate> |
---|
82 | <asp:Label ID="lblTitel" runat="server" Text='<%# Eval("titel") %>' EnableViewState="false" CssClass="titel" /> |
---|
83 | <asp:Label ID="lblContent" runat="server" Text='<%# Eval("Text") %>' EnableViewState="false" /> |
---|
84 | </ItemTemplate> |
---|
85 | <EditItemTemplate> |
---|
86 | <div class="listSection"> |
---|
87 | <FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" BasePath = "~/fckeditor/" EditorAreaCSS="~/hfiles/all.css" Width="600" ToolbarSet="Beugen" Value='<%# Bind("Text") %>' /> |
---|
88 | </div> |
---|
89 | </EditItemTemplate> |
---|
90 | </asp:FormView> |
---|
91 | |
---|
92 | </div> |
---|
93 | |
---|
94 | </ContentTemplate> |
---|
95 | </asp:UpdatePanel> |
---|
96 | |
---|
97 | </div> |
---|
98 | </form> |
---|
99 | </body> |
---|
100 | </html> |
---|