1
Erorr when document property is empty
Question asked by sepideh sobhgol - 6/29/2017 at 5:18 AM
Unanswered
hello,
I get an error when I don't set document or when I leave it empty....when document Viewer is loaded I want it to be loaded without document and then I want to set a document for it..how I can fix it?
@{
    var documentViewer = new DocumentViewer
    {
        Width = 1000,
        Height = 900,
        Document = ""
    };
}
 
another thing is that when I set a document for it,i can not change it to other document.....Actually I have a button..After clicking on button I want to set document like this code below....but nothing happens..the document is not changing to new one.
function navigate(target) {
        $.ajax({
            url: '@Url.Action("Download", "Patient")',
            type: 'GET',
            async: true,
            dataType: 'json',
            cache: false,
            data: { 'filepath': target },
            success: function (results) {
                documentViewer.Document = "C:/GIT/pegasosASP/client/web/GleamTech/uploads/04) PDF-";   
     });
    }

Reply to Thread