HighDots Forums  

Re: ampersand in urls when using xhtml 1.0 strict

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss Re: ampersand in urls when using xhtml 1.0 strict in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Martin Honnen
 
Posts: n/a

Default Re: ampersand in urls when using xhtml 1.0 strict - 12-17-2007 , 11:51 AM






mark4asp wrote:

Quote:
If I have, say:
<a href="../page1.aspx?a=1&amp;b=gonow">Go Now</a
in my html, on clicking the link, will FF give :
blah blah/page1.aspx?a=1&b=gonow
in the address bar?

It's not doing that for me. It gives
blah blah/page1.aspx?a=1&amp;b=gonow
Can you post a URL where that happens?

--

Martin Honnen
http://JavaScript.FAQTs.com/


Reply With Quote
  #2  
Old   
mark4asp
 
Posts: n/a

Default Re: ampersand in urls when using xhtml 1.0 strict - 12-17-2007 , 12:13 PM






Martin Honnen wrote:

Quote:
mark4asp wrote:

If I have, say:
<a href="../page1.aspx?a=1&amp;b=gonow">Go Now</a
in my html, on clicking the link, will FF give :
blah blah/page1.aspx?a=1&b=gonow
in the address bar?

It's not doing that for me. It gives
blah blah/page1.aspx?a=1&amp;b=gonow

Can you post a URL where that happens?
I'm sorry. It is happening right now on my local web-server. This is an
asp.net 2.0 application I am running over microsoft's Cassini server
[the developer's 'baby' web-server - not IIS]. Even if it were live,
it's a subscription only site.

It's a puzzle alright. I tell asp.net to write an &amp; in the code
behind for the gridview (OnRowDataBound event). It gives me a &
But if I tell it to write an &amp; for the asp.net Repeater I get the
&amp; in the html with no problems. [ILLOGICAL]. The asp.net controls
shoudl be consistent!

FF consistently puts the &amp; in the address bar. [WRONG]

The validation software tells me the page with a '&' in the hrefs is OK
[WRONG]

So there are several wrong things going on here all at once.


I guess I should continue this in the asp.net forum.




--



Reply With Quote
  #3  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: ampersand in urls when using xhtml 1.0 strict - 12-17-2007 , 12:20 PM



mark4asp wrote:
Quote:
Martin Honnen wrote:

mark4asp wrote:

If I have, say:
<a href="../page1.aspx?a=1&amp;b=gonow">Go Now</a
in my html, on clicking the link, will FF give :
blah blah/page1.aspx?a=1&b=gonow
in the address bar?

It's not doing that for me. It gives
blah blah/page1.aspx?a=1&amp;b=gonow
Can you post a URL where that happens?

I'm sorry. It is happening right now on my local web-server. This is an
asp.net 2.0 application I am running over microsoft's Cassini server
[the developer's 'baby' web-server - not IIS]. Even if it were live,
it's a subscription only site.

It's a puzzle alright. I tell asp.net to write an &amp; in the code
behind for the gridview (OnRowDataBound event). It gives me a &
But if I tell it to write an &amp; for the asp.net Repeater I get the
&amp; in the html with no problems. [ILLOGICAL]. The asp.net controls
shoudl be consistent!
Wait a minute--it just hit me. I'm not that familiar with ASP.NET but I
know Visual Studio second-guesses the developer in certain ways. Have
you checked View Source in Firefox to see what's in the source code
being received by the browser? I suspect that when you put a link
control on an ASP page, it assumes you're entering the actual, unencoded
URL and *encodes it for you*. So if you're entering &amp;, it's
converting it to &amp;amp;. Check it and see.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.