473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Stupid little problem with &

Hi,

I'm trying to add an onclick event to a button control so it will open
up a new popup window. Everything works fine except where I add
variables to pass on to the popup window. Where I have "&column" it
prints out the html as "&column", like I'm trying to write to html.
How do I avoid this?

Button btn = new System.Web.UI.WebControls.Button();
btn.Text = "Upload";
btn.CssClass = "button";
btn.Attributes.Add("onClick","javascript:window.op en('/admin/inc/upload.aspx?id="
+ pageID + "&column=" + columnID +
"','Upload','location=0,status=0,scrollbars=0,widt h=500,height=350');");

thnx in advance,
joro

Nov 22 '05 #1
2 1270
try this:
("onClick","javascript:window.open('/admin/inc/upload.aspx?id="
+ pageID + Server.UrlEncode("&column="( + columnID +
"','Upload','location=0,status=0,scrollbars=0,widt h=500,height=350');");

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"JoRo" <ch*******@adminconsole.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
Hi,

I'm trying to add an onclick event to a button control so it will open
up a new popup window. Everything works fine except where I add
variables to pass on to the popup window. Where I have "&column" it
prints out the html as "&amp;column", like I'm trying to write to html.
How do I avoid this?

Button btn = new System.Web.UI.WebControls.Button();
btn.Text = "Upload";
btn.CssClass = "button";
btn.Attributes.Add("onClick","javascript:window.op en('/admin/inc/upload.aspx
?id=" + pageID + "&column=" + columnID +
"','Upload','location=0,status=0,scrollbars=0,widt h=500,height=350');");

thnx in advance,
joro

Nov 22 '05 #2
hmm, that changes "&column" into "%26column" - no good when requesting
the querystring info. It needs to somehow just stay at "&column"

"&column" = &amp;column
Server.HtmlEncode("&column") = &amp;amp;column
Server.UrlEncode("&column") = %26column
Server.Don't****Change = &column

Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: JoRo | last post by:
Hi, I'm trying to add an onclick event to a button control so it will open up a new popup window. Everything works fine except where I add variables to pass on to the popup window. Where I have...
119
by: rhat | last post by:
I heard that beta 2 now makes ASP.NET xhtml compliant. Can anyone shed some light on what this will change and it will break stuff as converting HTML to XHTML pages DO break things. see,...
4
by: K8CPA | last post by:
Hi Guys, I've got a question from a stupid question from a clueless computer operator's standpoint. I use Windows XP. SP2, and I've got all these neat little programs. What language do they...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.