I am generating a Word document with aspose and I would like to show some kind of preview to the user before they decide to save the document. I have a view where users can enter their info:
@model WordAutomation.Models.Document
@{
ViewBag.Title = "Document";
}
<h2>Document</h2>
@using (Html.BeginForm()) {
@Html.ValidationSummary(true)
<fieldset>
<legend>Document</legend>
<div class="editor-label">
@Html.LabelFor(model => model.ClientTitle)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.ClientTitle)
@Html.ValidationMessageFor(model => model.ClientTitle)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.ClientFullName)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.ClientFullName)
@Html.ValidationMessageFor(model => model.ClientFullName)
</div>
<p>
<input type="submit" value="Create" />
</p>
</fieldset>
}
<div>
@Html.ActionLink("Preview", "Preview")
</div>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}
Now I have the controller for preview:
public ActionResult Preview()
{
return View();
}
When the user clicks on preview I want to generate the Word document (that part is already done) and display it as a popup on the screen for the user.
Exactly what I need is how to display image on the screen, once I'll enter the preview controller. Is that possible somehow?