Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created November 21, 2023 10:52
Show Gist options
  • Save bjoerntx/bb3731339e63e9108d7199bf81ddde6b to your computer and use it in GitHub Desktop.
Save bjoerntx/bb3731339e63e9108d7199bf81ddde6b to your computer and use it in GitHub Desktop.
@using TXTextControl.Web.MVC
@Html.TXTextControl().TextControl().Render()
<input type="button" onclick="loadDocument()" value="Load Document" />
<script>
var connectionID;
TXTextControl.addEventListener("textControlLoaded", function () {
connectionID = TXTextControl.connectionID;
});
function loadDocument() {
$.ajax({
url: '@Url.Action("LoadDocument")',
type: 'POST',
data: { connectionID: connectionID },
});
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment