Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Editor for .NET
»
Re: Dynamically set editor background colour VB Re Post 8845
Re: Dynamically set editor background colour VB Re Post 8845
08-02-2009, 7:35 PM
Kenneth
Joined on 02-13-2008
Posts 3,886
Re: Dynamically set editor background colour VB Re Post 8845
Reply
Quote
Hi stevef,
Try this way:
<%@ Page Language=
"C#"
%>
<%@ Register Assembly=
"CuteEditor"
Namespace=
"CuteEditor"
TagPrefix=
"CE"
%>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<html xmlns=
"http://www.w3.org/1999/xhtml"
>
<head runat=
"server"
>
<title>Untitled Page</title>
<script runat=
"server"
>
string
DynamicStyle =
"background-color:blue"
;
protected
void
ChangeColor_Click(
object
sender, EventArgs e)
{
Editor1.EditorBodyStyle = DynamicStyle;
}
</script>
</head>
<body>
<form id=
"form1"
runat=
"server"
>
<CE:Editor ID=
"Editor1"
runat=
"server"
EditorBodyStyle=
"background-color:red"
>
</CE:Editor>
<asp:Button ID=
"ChangeColor"
runat=
"server"
Text=
"Change editor background color"
OnClick=
"ChangeColor_Click"
/>
</form>
</body>
</html>
Regards,
Ken
View Complete Thread