Link to home
Start Free TrialLog in
Avatar of HellaSym
HellaSym

asked on

Input into textarea slow when displaying documents in iframe

Experts,

We are using an iframe to display documents in our web page*. Choosing the document sets the src of the iframe to an aspx page with some info in the query string. The page load adds the document to the response and it displays. That part works fine.

The problem is that when the iframe is displaying a document, typing into textareas on the page is painfully slow. You type, you wait, the input appears.

Thanks.

* I don't think it matters but the web page is created using web parts so the iframe is in one part and the text area is in another.
Code adding document to page response
 
protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                WorkItem wi = SessionManager.Current.GetWorkItem(Request.QueryString["WorkitemId"]);
                using (Global360Service service = Global360ServiceFactory.Create(wi))
                {
                    Global360WebServiceWrapper vs = service as Global360WebServiceWrapper;
                    if (vs == null) throw new Exception("Service could not be cast as a Global360WebServiceWrapper.");
 
                    string docExt = Request.QueryString["DocExt"];
                    Response.Clear();
                    Response.ClearContent();
                    Response.ClearHeaders();
                    Response.ContentType = Utils.Utils.GetMimeType(docExt);
                    Document doc = vs.WebService.GetDocument(Request.QueryString["DocumentId"], 0, -1, true);
                    Response.BinaryWrite(((DesktopDocument)doc).DesktopFileData);
                    Response.End(); 
                }
            }
            catch (Exception ex)
            {
                TraceUtil.TraceError("FileDownload.aspx.cs.Page_Load", ex);
                throw ex;
            }
        }

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of HellaSym
HellaSym

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial