AJAX Refresh

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
tafsolathe
Posts: 1
Joined: Thu Feb 01, 2018 6:02 pm

AJAX Refresh

Post by tafsolathe » Thu Feb 01, 2018 7:23 pm

I have a PDF viewer, which works fine if loaded on page_load. However if I throw the control in an updatepanel and try to perform the refresh without a full postback it blanks the control. I'm looking for something like a .Databind() function, or similar approach so I can refresh the control with new files without a full postback.

dvw_attachment.LoadFromStream(new MemoryStream(files), true);

AJ1985
Posts: 2
Joined: Wed May 16, 2018 11:34 pm

Re: AJAX Refresh

Post by AJ1985 » Wed May 16, 2018 11:54 pm

Hey tafsolathe,

Did you find any solution for this issue? Even I am facing the similar problem.

I have simple treeview which displays the documents and when clicked on the node will display the document in DocuVieware. This code works if the treeview and docuvieware are not in the update panel, but if they are inside the update panel the docuvieware is not displaying the document not it is loading the docuvieware control.

Please help me if you know the solution for this issue.

Below is my code:

ASPX Page:
<form id="form1" runat="server">
<asp:ScriptManager runat="server"></asp:ScriptManager>
<%-- <asp:UpdatePanel runat="server" ID="up">
<ContentTemplate>--%>

<asp:TreeView runat="server" ID="TreeView1" OnSelectedNodeChanged="TreeView1_SelectedNodeChanged">
</asp:TreeView>

<cc1:DocuVieware ID="DocuVieware1" runat="server" Height="600px" Width="100%" />

<%--</ContentTemplate>
</asp:UpdatePanel>--%>
</form>

Code behind:
protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
var docbyte = from l in db.DocumentRepositories
where l.DocumentRepositoryId == Convert.ToInt32(this.TreeView1.SelectedNode.Value)
select l;
if (docbyte.Any())
{
FileStream stream = new FileStream(docbyte.First().FileLocationPath, FileMode.Open, FileAccess.Read);
DocuVieware1.LoadFromStream(stream, true, this.TreeView1.SelectedNode.Text);
}
}

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests