473,408 Members | 1,749 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,408 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 1279
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.