By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,542 Members | 961 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,542 IT Pros & Developers. It's quick & easy.

literal & chanracter in anchor tag name

P: n/a
Currently I have a user control which contain a <a href> link tag. I have a
requirement to change the name property of the anchor tag to something like
this:

<a href="somepage.aspx" id"thislink" name="&lid=somename">Link</a>

The problem is that when the aspx page renders this user control, the &
character is converted to <literal>&amp;</literal>. So what I end with is:

<a href="somepage.aspx" id"thislink"
name="<literal>&</literal>amp;lid=somename">Link</a>

Is there any way to force the aspx page to render the & character literally
instead of url encoding it?

Apr 24 '06 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Just to clarify (hopefully) what I need the control to render is this:

<a href="somepage.aspx" id"thislink" name="&lid=somename">Link</a>

What it currently renders is this:

<a href="somepage.aspx" id"thislink" name="&amp;lid=somename">Link</a>
"JeffP" wrote:
Currently I have a user control which contain a <a href> link tag. I have a
requirement to change the name property of the anchor tag to something like
this:

<a href="somepage.aspx" id"thislink" name="&lid=somename">Link</a>

The problem is that when the aspx page renders this user control, the &
character is converted to <literal>&</literal>. So what I end with is:

<a href="somepage.aspx" id"thislink"
name="<literal>&</literal>amp;lid=somename">Link</a>

Is there any way to force the aspx page to render the & character literally
instead of url encoding it?

Apr 24 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.