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

  • SEARCH
  • Home
  • 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 8862475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:44:16+00:00 2026-06-14T15:44:16+00:00

I am upgrading a legacy application and it uses the annoying practice of using

  • 0

I am upgrading a legacy application and it uses the annoying practice of using Javascript window.open() to open popup windows in order to set values. I’m having a problem passing querystring variables to that popup window, since the url is built server side.

Example

JS:

function popupwindow(vLink) { 
    window.open(vLink, 'Detail','width=600px,height=545px,status=yes,help=no,scrollbars=yes,resizable=yes,top=350');
}

XML

<asp:Label ID="lblOpener" runat="server" Text="_"></asp:Label>

Server Side

int ditem = 123;
string dcode = "ABC";
string vLink = string.Format("detail.aspx?item={0}&code={1}", ditem, dcode);
lblOpener.Attributes.Add("onclick", "popupwindow('" & vLink & "');");

When the label is clicked I am expecting the popup to open with the querystring:

http://detail.aspx?item=123&code=ABC

Instead, I get something like this:
http://detail.aspx?item=123&amp%3bcode=ABC

How can I prevent this from happening?

  • 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-06-14T15:44:17+00:00Added an answer on June 14, 2026 at 3:44 pm

    You could try encoding using a JavaScriptSerializer:

    lblOpener.Attributes.Add("onclick", "popupwindow(" & New JavaScriptSerializer().Serialize(vLink) & ");");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a legacy app I'm upgrading with TouchDB. The app uses a UIWebView
I am upgrading a legacy Grails application and also upgrade the acegi plugin from
I'm debugging and upgrading some legacy PHP and JavaScript code and I've found some
I have encountered a weird situation while updating/upgrading some legacy code. I have a
In upgrading my application from v1 to v2, I've made a few small changes
I am upgrading a legacy app to iOS 6, which only supports landscape orientation.
We have an application with legacy code that relies on prototype, but we've found
After upgrading to Ruby 1.9.3 (from 1.9.2 using system RVM) on Ubuntu 10.04.3, I
Good morning everyone, I am working on a legacy ASP Classic application which needs
I'm working with a legacy CakePHP 1.1 application, and ideally need to modify some

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.