|
|
|
проблема с подключением HtmlEditor
|
|||
|---|---|---|---|
|
#18+
Добрый день. Такая проблема , подключаю к 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> И что тогда мне делать? как разрешить проблему? Заранее спасибо! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 23.09.2011, 12:34:16 |
|
||
|
проблема с подключением HtmlEditor
|
|||
|---|---|---|---|
|
#18+
den_first, мало инфы. могу только сказать, что и на мастерстраницах можно использовать биндинг-синтаксис. видимо, что-то вы еще делаете "не так"... делайте пример, показывайте код. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 23.09.2011, 12:50:51 |
|
||
|
проблема с подключением HtmlEditor
|
|||
|---|---|---|---|
|
#18+
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> ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 23.09.2011, 13:01:10 |
|
||
|
проблема с подключением HtmlEditor
|
|||
|---|---|---|---|
|
#18+
вначале одинокая "<" это описка? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 23.09.2011, 13:14:08 |
|
||
|
|

start [/forum/topic.php?fid=18&msg=37453210&tid=1360606]: |
0ms |
get settings: |
8ms |
get forum list: |
13ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
202ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
39ms |
get tp. blocked users: |
1ms |
| others: | 232ms |
| total: | 512ms |

| 0 / 0 |
