powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / проблема с подключением HtmlEditor
5 сообщений из 5, страница 1 из 1
проблема с подключением HtmlEditor
    #37453101
den_first
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Добрый день.
Такая проблема , подключаю к DetalView на Edit, Insert чтобы открывался HtmlEdit
на обычной страничке все получилось, а вот на форме MasterPage появились ошибки , сначало ошибка:

This page is missing a HtmlHead control which is required for the CSS stylesheet link that is being added. Please add <head runat="server" />.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NotSupportedException: This page is missing a HtmlHead control which is required for the CSS stylesheet link that is being added. Please add <head runat="server" />.

Добавил в MasterPage в <head> runat ="server"
<head runat="server">
появилась другая ошибка:

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

типа что используютcя контролы с кодовым блоком (i.e. <% ... %>).
да у меня <% ... %> :

ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString %>"

asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("text") %>'></asp:TextBox>

И что тогда мне делать? как разрешить проблему?
Заранее спасибо!
...
Рейтинг: 0 / 0
проблема с подключением HtmlEditor
    #37453145
Zoria
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
den_first,

мало инфы. могу только сказать, что и на мастерстраницах можно использовать биндинг-синтаксис.
видимо, что-то вы еще делаете "не так"... делайте пример, показывайте код.
...
Рейтинг: 0 / 0
проблема с подключением HtmlEditor
    #37453179
den_first
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Zoriaden_first,

мало инфы. могу только сказать, что и на мастерстраницах можно использовать биндинг-синтаксис.
видимо, что-то вы еще делаете "не так"... делайте пример, показывайте код.

код моей формы:

<%@ Page Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="ReferatSite.WebForm2" Title="Untitled Page" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
< <asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="id_referat"
DataSourceID="SqlDataSource1" Height="205px" Width="486px">
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="id_referat" HeaderText="id_referat"
InsertVisible="False" ReadOnly="True" SortExpression="id_referat" />
<asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString %>"
SelectCommand="SELECT [id_referat], [name] FROM [Referats]">
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString %>"
DeleteCommand="DELETE FROM [Referats] WHERE [id_referat] = @id_referat"
InsertCommand="INSERT INTO [Referats] ([kod_arxiva], [name], [text], [cena]) VALUES (@kod_arxiva, @name, @text, @cena)"
SelectCommand="SELECT [kod_arxiva], [name], [text], [cena], [id_referat] FROM [Referats] WHERE ([id_referat] = @id_referat)"
UpdateCommand="UPDATE [Referats] SET [kod_arxiva] = @kod_arxiva, [name] = @name, [text] = @text, [cena] = @cena WHERE [id_referat] = @id_referat">
<SelectParameters>
<asp:ControlParameter ControlID="GridView1" Name="id_referat"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="id_referat" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="kod_arxiva" Type="Int32" />
<asp:Parameter Name="name" Type="String" />
<asp:Parameter Name="text" Type="String" />
<asp:Parameter Name="cena" Type="Double" />
<asp:Parameter Name="id_referat" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="kod_arxiva" Type="Int32" />
<asp:Parameter Name="name" Type="String" />
<asp:Parameter Name="text" Type="String" />
<asp:Parameter Name="cena" Type="Double" />
</InsertParameters>
</asp:SqlDataSource>
<asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True"
AutoGenerateRows="False" DataKeyNames="id_referat"
DataSourceID="SqlDataSource2" Height="50px" Width="125px">
<Fields>
<asp:BoundField DataField="kod_arxiva" HeaderText="kod_arxiva"
SortExpression="kod_arxiva" />
<asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
<asp:TemplateField HeaderText="text" SortExpression="text">
<EditItemTemplate>
<cc1:Editor ID="Editor1" runat="server" Content='<%# Bind("text") %>' />
</EditItemTemplate>
<InsertItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("text") %>'></asp:TextBox>
</InsertItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("text") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="text" HeaderText="text" SortExpression="text" />
<asp:BoundField DataField="id_referat" HeaderText="id_referat"
SortExpression="id_referat" InsertVisible="False" ReadOnly="True" />
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True"
ShowInsertButton="True" />
</Fields>
</asp:DetailsView>



</asp:Content>
...
Рейтинг: 0 / 0
проблема с подключением HtmlEditor
    #37453210
Zoria
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
вначале одинокая "<" это описка?
...
Рейтинг: 0 / 0
проблема с подключением HtmlEditor
    #37453279
den_first
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Zoriaвначале одинокая "<" это описка?
Если имелось ввиду
< <asp:GridView ID="GridView1"...
да, описка..
...
Рейтинг: 0 / 0
5 сообщений из 5, страница 1 из 1
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / проблема с подключением HtmlEditor
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]