StyleSheet getting all messed up when doing a Response.Write

Posted on 2009-02-16
Last Modified: 2012-05-06
I have a reports page which makes the following call:

Response.Write( _
                        "<script language='javascript'>'../ReportViewer.aspx?reportname=Adjustments.rpt&startdate=" & _
                        Todate & "&exportType=" & Me.drpExportType.Text.ToString() & "&employmentCode=" & user & _
                        "' , 'ReportViewer', 'toolbars=yes,scrollbars=yes,status=yes,resizable=yes'); </script>")

So this opens a ReportViewer Page, which handles the Crystal Report to build up the .rpt file.

The problem is that my calling page gets all messed up, it seems as if it's removing the the padding within one my DIV's

I am using MasterPages
Question by:directxBOB
    1 Comment
    LVL 12

    Accepted Solution

    use this code instead.
            Dim target As String = "'../ReportViewer.aspx?reportname=Adjustments.rpt&startdate=" & _
                                    Todate & "&exportType=" & Me.drpExportType.Text.ToString() & "&employmentCode=" & User & _
                                    "' , 'ReportViewer', 'toolbars=yes,scrollbars=yes,status=yes,resizable=yes');"
    Page.ClientScript.RegisterStartupScript(Page.GetType(), "openReport", target, True)

    Open in new window


    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now