через DetailsView + Editor я записал отформатированный текст в бд: как мне теперь его просмотреть (чтобы теги распознавались как форматирование )???
<asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True"
AutoGenerateRows="False" DataKeyNames="id_articles"
DataSourceID="SqlDataSource2" Height="443px" Width="864px">
<Fields>
<asp:BoundField DataField="id_articles" HeaderText="id_articles"
InsertVisible="False" ReadOnly="True" SortExpression="id_articles"
Visible="False" />
<asp:BoundField DataField="name" HeaderText="Наименование статьи"
SortExpression="name" />
<asp:TemplateField HeaderText="Содержание статьи" SortExpression="text">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("text") %>'></asp:TextBox>
</EditItemTemplate>
<InsertItemTemplate>
<cc1:Editor ID="Editor1" runat="server" />
</InsertItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("text") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True"
ShowInsertButton="True" />
</Fields>
</asp:DetailsView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [Articles] WHERE [id_articles] = @id_articles"
InsertCommand="INSERT INTO [Articles] ([name], [text]) VALUES (@name, @text)"
SelectCommand="SELECT [id_articles], [name], [text] FROM [Articles] WHERE ([id_articles] = @id_articles)"
UpdateCommand="UPDATE [Articles] SET [name] = @name, [text] = @text WHERE [id_articles] = @id_articles">
<SelectParameters>
<asp:ControlParameter ControlID="GridView1" Name="id_articles"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="id_articles" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="name" Type="String" />
<asp:Parameter Name="text" Type="String" />
<asp:Parameter Name="id_articles" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="name" Type="String" />
<asp:ControlParameter Name="text" Type="String" ControlID="Detailsview1$Editor1" PropertyName="content" />
</InsertParameters>
</asp:SqlDataSource>Модератор: Отредактировано берите исходники в SRC |