Hiding the address bar RRS feed

  • Question

  • User-614943948 posted

    I am using this source code to open a popup windows.

    string strUserID = "Reporting.aspx?ID=" + Request.QueryString["ID"].ToString();
            string script = "window.open('" + strUserID + "', 'popup_window', 'width=1280,height=1080,left=100,top=100,resizable=yes');";
            ClientScript.RegisterStartupScript(this.GetType(), "popUp", script, true);

    But that pop up windows displays address bar. How can i hide it?

    Similarly in another page I use Response.Redirect to call an ASPX page with query string, and I want to hide the addressbar there too.

    I hope hiding addressbar will not affect the value passed through querystring?

    Thursday, January 14, 2021 8:52 AM

All replies

  • User753101303 posted


    Seems a "safety" measure. It seeems it would be much better to solve the roor cause, for example checking on the server side that this report id is really available to the currenlty authenticated users (I assume you want to prevent someone chaning this number tio gain access to unauthorized data ?)

    You have localtion=no but if yu still need to do that for a top level window it starts to be really a browser dependent hack an a minute could be enough for a knowleaable user to srtill change this value and gain unwanted data. 

    It could be better to solve the root cause instead. For example if you try to prevent someone to see a rchanging this nuumber to access things he shouldn't see, you should check the querystring ID to see if it matches a report authorized for the currently authenticated user.

    Else try location=no. You may have Then  if you want to do that on non

    Thursday, January 14, 2021 9:59 AM