Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created October 9, 2015 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/dbdd8d9c27919d7fc824 to your computer and use it in GitHub Desktop.
Save bjoerntx/dbdd8d9c27919d7fc824 to your computer and use it in GitHub Desktop.
protected void btnStore_Click(object sender, EventArgs e)
{
// save the document and store in a hidden field
// as a Base64 encoded string
byte[] data;
TextControl1.SaveText(out data,
TXTextControl.Web.BinaryStreamType.InternalUnicodeFormat);
hiddenDocument.Value = Convert.ToBase64String(data);
// call the 'storeDocument()' JS function
System.Web.UI.ScriptManager.RegisterClientScriptBlock(
this, this.GetType(),
"CallStoreDocument",
"storeDocument();", true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment