set label after pdf load

Last post 09-21-2009 11:17 PM by Nai-Dong Jin - MSFT. 1 replies.

Sort Posts:

  • set label after pdf load

    09-14-2009, 4:24 PM
    • Member
      520 point Member
    • JsonTerre1
    • Member since 08-16-2004, 11:40 AM
    • Posts 180

     I have the following in my code behind (vb.net) to render a pdf.

            Response.Clear()
            Response.ClearContent()
            Response.ClearHeaders()
    
    
            Response.AppendHeader("content-length", objResult.Length.ToString)
            Response.AddHeader("Content-Disposition", "attachment")
            Response.ContentType ="Application/pdf" 
    
    
            Response.BinaryWrite(objResult)
            Response.Flush()
            Response.Close()
     
    	Me.lblMessage.Visible = True
    	Me.lblMessage.Text = "SOME TEXT"

     

    This pops up the windows "open or save" dialog box which works the way i want it to although I would like to then take a label on the html page set a value and make it visable. The problem is that the diolog works although I cannot get the label to show. Any thoughts?

     

    j

  • Re: set label after pdf load

    09-21-2009, 11:17 PM
    Answer

     Hi,

    From your description, it seems that you want to pop up the open/save window and display some text in text label right?

    If so, I think you should separate the whole things into two parts. First you can assign the text property of the label on your web form, and then use RegisterStartupScript method to open a new page in a new window, and just render the PDF file in the new opened page.

    Thanks.

    Michael Jin.
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Page 1 of 1 (2 items)