Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3396830
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:27:16+00:00 2026-05-18T04:27:16+00:00

net application, in which i am using some popup windows to open some pages.

  • 0

net application, in which i am using some popup windows to open some pages. For this, i am using a method like this

private void OpenWindow(string Url, string height, string Width)
{
    try
    {
        string strScript = "";
        strScript += "<script language=\"javascript\">";
        strScript += "eval(\"popUpWindow('" + Url + "',0,0," + Width + "," + height + ",directories=no)\");";
        strScript += "</script>";
        lblScript.Text = strScript;
    }
    catch (Exception ex)
    {
        LogError.Log(ex);
        throw;
    }
}

JavaScript function as this:

var popUpWin = 0;

function popUpWindow(URLStr, left, top, width, height, windowName) {
    left = (screen.width / 2) - width / 2;
    top = (screen.height / 2) - height / 2;
    if (popUpWin) {
        if (!popUpWin.closed)
            popUpWin.close();
    }
    popUpWin = open(URLStr, windowName, 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width=' + width + ',height=' + height + ',left=' + left + ', top=' + top + ',screenX=' + left + ',screenY=' + top + '');
    popUpWin.focus();
}

Now its working as fine with showing the address bar. But my requirement is that i have to hide the address bar in all of my popup window. Is this possible? Please help by providing one solution. thanks in davance..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:27:16+00:00Added an answer on May 18, 2026 at 4:27 am

    Anyway use System.Text.StringBuilder instead of string concatenation.

    var sb = new StringBuilder();
    sb.Append("<script language=\"javascript\">");
    sb.AppendFormat("eval(\"popUpWindow('{0}',0,0,{1},{2},directories=no)\");", url, width, height);
    sb.Append("</script>");
    lblScript.Text = sb.ToString();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .NET application, which is using an open source C++ compression library
We have an ASP.NET application on ASP.NET 4.0 using MVC 3 which uses Windows
I have some .aspx pages in my asp.net web application which only admin can
I have a C#/.NET Winforms application which has some settings stored using A '.settings'
I'm writing a vb.net application which connects to a db using integrated security. However,
I have an ASP.NET application in which i want to post data using jQuery
We have an ASP.net 2.0 web application which is using themes set on the
i have one application which is build using VB.NET now i required to add
I have an ASP.net web service that I'm using for a web application which
We are using MSMQ to store an object. The client application (which is asp.net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.