Здравствуйте гуру ASP net
проблема вот в чем, при запросе update sqldatasource не заносит изменение в базу некоторых
textbox с TextMode="MultiLine" с подключённым редактором nicEdit
все другие поля сохраняются нормально
в Web.config прописал <httpRuntime requestValidationMode="2.0" />
в aspx страничке в <page > прописал ValidateRequest="false"
когда отключаю nicEdit все работает нормально
ниже приведен код всей страницы aspx
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
CodeBehind="admindelalis.aspx.cs" Inherits="rpb.admin.admindelalis" validateRequest="false"%>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script src="/Scripts/nicEdit.js" type="text/javascript"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function () {
nicEditors.allTextAreas();
new nicEditor({ fullPanel: true });
});
</script>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:RpbSiteDBConnectionString %>"
DeleteCommand="DELETE FROM [posts] WHERE [postid] = @postid" InsertCommand="INSERT INTO [posts] ([head], [anonse], [text], [data], [author]) VALUES (@head, @anonse, @text, @data, @author)"
SelectCommand="SELECT * FROM [posts] WHERE ([postid] = @postid)" UpdateCommand="UPDATE [posts] SET [head] = @head, [anonse] = @anonse, [text] = @text, [data] = @data, [author] = @author WHERE [postid] = @postid">
<DeleteParameters>
<asp:Parameter Name="postid" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="head" Type="String" />
<asp:Parameter Name="anonse" Type="String" />
<asp:Parameter Name="text" Type="String" />
<asp:Parameter DbType="Date" Name="data" />
<asp:Parameter Name="author" Type="String" />
</InsertParameters>
<SelectParameters>
<asp:QueryStringParameter Name="postid" QueryStringField="news" Type="Int32" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="head" Type="String" />
<asp:Parameter Name="anonse" Type="String" />
<asp:Parameter Name="text" Type="String" />
<asp:Parameter DbType="Date" Name="data" />
<asp:Parameter Name="author" Type="String" />
<asp:Parameter Name="postid" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="postid"
DataSourceID="SqlDataSource1" Height="50px" Width="100%">
<Fields>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<table style="width: 100%;" width="100%">
<tr>
<td valign="top" width="200px">
Заголовок
</td>
<td valign="top">
<asp:Label ID="Label1" runat="server" Text='<%# Bind("head") %>'></asp:Label>
</td>
</tr>
<tr>
<td valign="top" width="200px">
Анонс новости
</td>
<td valign="top">
<asp:Label ID="Label2" runat="server" Text='<%# Bind("anonse") %>'></asp:Label>
</td>
</tr>
<tr>
<td valign="top" width="200px">
Текст новости
</td>
<td valign="top">
<asp:Label ID="Label3" runat="server" Text='<%# Bind("text") %>'></asp:Label>
</td>
</tr>
<tr>
<td valign="top" width="200px">
Дата публикации
</td>
<td valign="top">
<asp:Label ID="Label4" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "data", "{0:d MMMM yyyy}")%>'></asp:Label>
</td>
</tr>
<tr>
<td valign="top" width="200px">
Автор публикации
</td>
<td valign="top">
<asp:Label ID="Label5" runat="server" Text='<%# Bind("author") %>'></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
<EditItemTemplate>
<table style="width: 100%;" width="100%">
<tr>
<td valign="top" width="200px">
Заголовок
</td>
<td valign="top">
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("head") %>' Width="100%"></asp:TextBox>
</td>
</tr>
<tr>
<td valign="top" width="200px">
Анонс новости
</td>
<td valign="top">
<asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("anonse") %>' Height="200px"
TextMode="MultiLine" Width="100%"></asp:TextBox>
</td>
</tr>
<tr>
<td valign="top" width="200px">
Текст новости
</td>
<td valign="top">
<asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("text") %>' Height="200px"
TextMode="MultiLine" Width="100%"></asp:TextBox>
</td>
</tr>
<tr>
<td valign="top" width="200px">
Дата публикации
</td>
<td valign="top">
<asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("data") %>' Width="100%"></asp:TextBox>
</td>
</tr>
<tr>
<td valign="top" width="200px">
Автор публикации
</td>
<td valign="top">
<asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("author") %>' Width="100%"></asp:TextBox>
</td>
</tr>
</table>
</EditItemTemplate>
</asp:TemplateField>
</Fields>
</asp:DetailsView>
</asp:Content>