emma,
You can usually just check if the page is posting back, as normally the save button is the only button on the CuteEditor that posts back:
if(Page.IsPostBack)
{
// Save it.
}
else
{
// do something else if need be.
}
You can also disable this save button and create your own submit button.
Here is an example:
<%@ Page Language="C#" %>
<%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
< html>
<head>
</head>
<body>
<form runat="server" ID="Form1">
<CE:Editor id="Editor1" runat="server"></CE:Editor>
<br>
<asp:Button id="btnUpdate" onclick="Submit" Runat="server" Text="Submit"></asp:Button>
</form>
</body>
</ html>
< script runat="server">
public void Submit(object sender, System.EventArgs e)
{
// Save the data to database here
}
</ script> |
But i dont want to open a db conn everytime the page is posted back everytime
You can't avoid open a db connection. Even with your own submit button, the page is posted back as well.
asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
asp wysiwyg html editor: http://cutesoft.net/ASP
asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
Live Support: http://cutesoft.net/live-support/default.aspx