Hello!
I have a question about opening the pdf in a new window. I have the following code and it works great but from the UI it opens the doc in the same window so I wanted to know if I can fix it to open in a new window?
MemoryStream stream = new MemoryStream(); document.Save(stream, false); HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ContentType = "application/pdf"; HttpContext.Current.Response.AddHeader("content-length", stream.Length.ToString()); HttpContext.Current.Response.BinaryWrite(stream.ToArray()); HttpContext.Current.Response.Flush(); stream.Close();
Thanks a lot!
-tulips
|