& causing validation problems
am 27.04.2007 17:37:34 von Mudiya DissaHi,
I have some code on my application like the following
<%
redirectUrl = "mypage.asp?type=100&id=something&view=10
'some more asp code
%>
the above code works fine but throws validation errors.
the errors are
# olumn 81: cannot generate system identifier for general entity "id".
An entity reference was found in the document, but there is no reference
by that name defined. Often this is caused by misspelling the reference
name, unencoded ampersands, or by leaving off the trailing semicolon
(;). The most common cause of this error is unencoded ampersands in URLs
as described by the WDG in "Ampersands in URLs".
and there are some more errors caused of this( I haven;t listed them all
here)
if I change the code to the following
<%
redirectUrl = "mypage.asp?type=100&id=something&view=10"
'some more asp code
%>
This will validate but when the users click on the url they will be
taken to "mypage.asp?type=100&id=something&view=10" which is not
correct.
Is there a way to overcome this problem.
I can change the code to be like this
but if I have to use the same link over and over again it's too hard to
change anything.
*** Sent via Developersdex http://www.developersdex.com ***