I've created a module/feature to talk to an existing database, and it needs to store some html. I've watched the dev video @ 19 about using the mojoportal web editor, and set things up using that method.
The web editor displays html from the database fine.
However, when I go to save records, I'm always getting an empty string instead of the contents I just typed in. Does anyone have any ideas?
here is my code:
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
cmdSave.Click +=
new EventHandler(cmdSave_Click);
Page.EnableViewState =
true;
if (Session["edsetup"] != "true") // did this in case the setup every time was wiping out the contents
{
SiteUtils.SetupEditor(edProdDesc);
SiteUtils.SetupEditor(edNotCovered);
Session[
"edsetup"] = "true";
}
}
private void PopulateControls()
{
if (!IsPostBack)
{
edNotCovered.EnableViewState =true;
edProdDesc.EnableViewState =true;
edProdDesc.WebEditor.ToolBar = mojoPortal.Web.Editor.ToolBar.AnonymousUser;
edProdDesc.WebEditor.Height =Unit.Pixel(250);
edProdDesc.WebEditor.Width =Unit.Pixel(300);
edNotCovered.WebEditor.ToolBar = mojoPortal.Web.Editor.ToolBar.AnonymousUser;
edNotCovered.WebEditor.Height =Unit.Pixel(250);
edNotCovered.WebEditor.Width =Unit.Pixel(300);
}
// }
}
protected void cmdSave_Click(object sender, EventArgs e)
{
string descr = edProdDesc.Text;
string notcvrd = edNotCovered.Text;
}