Hi,
please try this code:
<%@ 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">
<script runat="server">
public string loaderName;
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
System.Web.HttpBrowserCapabilities browser = Request.Browser;
string browserName = browser.Browser;
switch (browserName)
{
case "IE":
loaderName = "IE_Loader";
break;
case "Firefox":
loaderName = "Gecko_Loader";
break;
case "AppleMAC-Safari":
loaderName = "Safari_Loader";
break;
case "Opera":
loaderName = "Opera_Loader";
break;
default:
break;
}
}
protected void button1_Click(object sender, EventArgs e)
{
panel1.Visible = true;
}
</script>
<script src="CuteSoft_Client/CuteEditor/Scripts/spell.js"></script>
<script src="CuteSoft_Client/CuteEditor/Scripts/<%=loaderName %>/Loader.js"></script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>test</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="pp1" runat="server">
<ContentTemplate>
<asp:Panel ID="panel1" runat="server" Visible="false">
<CE:Editor ID="editor1" runat="server">
</CE:Editor>
</asp:Panel>
<asp:Button ID="button1" runat="server" Text="Click Me To Show Editor" OnClick="button1_Click" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
Regards,
ken