Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Editor for .NET
»
Re: Problem with MAXHTMLLENGTH and MAXTEXTLENGTH
Re: Problem with MAXHTMLLENGTH and MAXTEXTLENGTH
06-25-2009, 4:03 AM
Kenneth
Joined on 02-13-2008
Posts 3,886
Re: Problem with MAXHTMLLENGTH and MAXTEXTLENGTH
Reply
Quote
Hi michcb,
Try this example
<%@ Page Language=
"C#"
Debug=
"true"
%>
<%@ Import Namespace=
"System.Data"
%>
<%@ Register TagPrefix=
"CE"
Namespace=
"CuteEditor"
Assembly=
"CuteEditor"
%>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<script runat=
"server"
>
ICollection CreateDataSource()
{
DataTable dt =
new
DataTable();
DataRow dr;
dt.Columns.Add(
new
DataColumn(
"IntegerValue"
,
typeof
(Int32)));
for
(
int
i = 0; i < 3; i++)
{
dr = dt.NewRow();
dr[0] = i;
dt.Rows.Add(dr);
}
DataView dv =
new
DataView(dt);
return
dv;
}
void
Page_Load(Object sender, EventArgs e)
{
if
(!IsPostBack)
{
FormView2.DataSource = CreateDataSource();
FormView2.DataBind();
}
}
</script>
<html xmlns=
"http://www.w3.org/1999/xhtml"
>
<head runat=
"server"
>
<title>Untitled Page</title>
</head>
<body>
<form id=
"form1"
runat=
"server"
>
<p>input more than 10 characters and click on the postback button</p>
<asp:FormView ID=
"FormView2"
AllowPaging=
"true"
runat=
"server"
DefaultMode=
"Edit"
BackColor=
"WhiteSmoke"
>
<EditItemTemplate>
<CE:Editor ID=
"Editor1"
runat=
"server"
Width=
"750px"
MaxTextLength=
"10"
AutoConfigure=
"Simple"
>
</CE:Editor>
</EditItemTemplate>
<PagerSettings Position=
"Bottom"
Mode=
"Numeric"
/>
</asp:FormView>
<asp:Button ID=
"button1"
runat=
"server"
Text=
"PostBack"
/>
</form>
</body>
</html>
Regards,
Ken
View Complete Thread