R
Richard
I have an ASP.NET webapp that generates a shipping label for a
customer. When the user clicks on the label preview gif or on a
"Print..." submit button, the app will open another window with a full
sized label.
Before I installed SP2 my workstation, all worked fine. However, now
with SP2 it opens the label window, but the page doesn't load in the
browser. When debugging in VS.NET, the Page_Init of the pop-up page
does not even run. This is only an issue with IE and no other
browsers. I've done about every Security setting in the Internet
Options as well (and turned off popup blocking).
Here is a rundown of what the code is like:
1. The LabelPreview.aspx page has a Print button that generates a
script to open a pop-up window:
Dim popUpWindow As String =
"<scriptlanguage='javascript'>window.open('PrintView.aspx')</script>"
RegisterStartupScript("popUpWindow", popupWindow)
2. PrintView.aspx uses another aspx page as an image (example; <img
src="Label.aspx">) and has behind-code that writes to an internal
database...note: the Page_Init in the behind-code is not firing.
3. Label.aspx is used to stream the image. Tt has mLabel as a member
object which is coming from a session variable that was generated even
before the user reaches these pages:
Dim stream As MemoryStream = New MemoryStream
Dim buffer As Byte()
mLabel = Session("objLabel")
mLabel.Image.Save(stream, Imaging.ImageFormat.Png)
buffer = stream.ToArray
Response.ContentType = "multipart/mixed"
Response.OutputStream.Write(buffer, 0, buffer.Length)
Response.OutputStream.Flush()
Response.OutputStream.Close()
stream.Close()
I am at a complete loss as to why this is not working. Anyone else
experience this...any ideas are extremely appreciated.
- Richard
customer. When the user clicks on the label preview gif or on a
"Print..." submit button, the app will open another window with a full
sized label.
Before I installed SP2 my workstation, all worked fine. However, now
with SP2 it opens the label window, but the page doesn't load in the
browser. When debugging in VS.NET, the Page_Init of the pop-up page
does not even run. This is only an issue with IE and no other
browsers. I've done about every Security setting in the Internet
Options as well (and turned off popup blocking).
Here is a rundown of what the code is like:
1. The LabelPreview.aspx page has a Print button that generates a
script to open a pop-up window:
Dim popUpWindow As String =
"<scriptlanguage='javascript'>window.open('PrintView.aspx')</script>"
RegisterStartupScript("popUpWindow", popupWindow)
2. PrintView.aspx uses another aspx page as an image (example; <img
src="Label.aspx">) and has behind-code that writes to an internal
database...note: the Page_Init in the behind-code is not firing.
3. Label.aspx is used to stream the image. Tt has mLabel as a member
object which is coming from a session variable that was generated even
before the user reaches these pages:
Dim stream As MemoryStream = New MemoryStream
Dim buffer As Byte()
mLabel = Session("objLabel")
mLabel.Image.Save(stream, Imaging.ImageFormat.Png)
buffer = stream.ToArray
Response.ContentType = "multipart/mixed"
Response.OutputStream.Write(buffer, 0, buffer.Length)
Response.OutputStream.Flush()
Response.OutputStream.Close()
stream.Close()
I am at a complete loss as to why this is not working. Anyone else
experience this...any ideas are extremely appreciated.
- Richard