Created
March 18, 2024 12:13
-
-
Save bjoerntx/c28d18bea4b18f63daf2bc90e1208580 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using TXTextControl.Web.MVC.DocumentViewer | |
@{ | |
// use an access token (for example returned by OAuth) | |
var sAccessToken = "821e2f35-86e3-4917-a963-b0c4228d1315"; | |
// build BasePath including access token in query string | |
var sProtocol = (Context.Request.IsHttps) ? "https://" : "http://"; | |
var sBasePathURL = sProtocol + Context.Request.Host | |
+ "?access_token=" + sAccessToken; | |
} | |
<div style="width: 800px; height: 600px;"> | |
@Html.TXTextControl().DocumentViewer(settings => | |
{ | |
settings.BasePath = sBasePathURL; // pass the base path | |
settings.Dock = DocumentViewerSettings.DockStyle.Fill; | |
}).Render() | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment