in the codebehind portion of a page, I dynamically create a series of
hyperlinks that I add to the page.
in that code, I have something like this:
dim h as new hyperlink
h.NavigateURL = "/somepage.aspx?age=35&gender=M"
Unfortunately, when it renders the HTML page, it changes the ampersand in
the URL as follows
h.NavigateURL = "/somepage.aspx?age=35&gender=M"
This, of course, doesn't work, because the 2nd parameter's name has now been
changed from 'gender' to 'amp;gender'
How can I get around this?
(I tried setting the 'href' attribute directly ...
h.attributes.add("href","/somepage.aspx?age=35&gender=M") ... but it
produces the same result) 3 1915
you might look into HttpUtility.HtmlEncode("yourtext")
"Boban Dragojlovic" <news@_N_O_S_P_AM_dragojlovic.org> wrote in message
news:MX***************@newssvr14.news.prodigy.com. .. in the codebehind portion of a page, I dynamically create a series of hyperlinks that I add to the page.
in that code, I have something like this:
dim h as new hyperlink
h.NavigateURL = "/somepage.aspx?age=35&gender=M"
Unfortunately, when it renders the HTML page, it changes the ampersand in the URL as follows
h.NavigateURL = "/somepage.aspx?age=35&gender=M"
This, of course, doesn't work, because the 2nd parameter's name has now
been changed from 'gender' to 'amp;gender'
How can I get around this?
(I tried setting the 'href' attribute directly ... h.attributes.add("href","/somepage.aspx?age=35&gender=M") ... but it produces the same result)
I am sorry I meant httputility.htmldecode("yourtext")
"vMike" <Mi************@nospam.gewarren.com.delete> wrote in message
news:bn**********@ngspool-d02.news.aol.com... you might look into HttpUtility.HtmlEncode("yourtext")
"Boban Dragojlovic" <news@_N_O_S_P_AM_dragojlovic.org> wrote in message news:MX***************@newssvr14.news.prodigy.com. .. in the codebehind portion of a page, I dynamically create a series of hyperlinks that I add to the page.
in that code, I have something like this:
dim h as new hyperlink
h.NavigateURL = "/somepage.aspx?age=35&gender=M"
Unfortunately, when it renders the HTML page, it changes the ampersand
in the URL as follows
h.NavigateURL = "/somepage.aspx?age=35&gender=M"
This, of course, doesn't work, because the 2nd parameter's name has now
been changed from 'gender' to 'amp;gender'
How can I get around this?
(I tried setting the 'href' attribute directly ... h.attributes.add("href","/somepage.aspx?age=35&gender=M") ... but it produces the same result)
One more comment, the & should not effect the url query string. It
should still work the same.
"Boban Dragojlovic" <news@_N_O_S_P_AM_dragojlovic.org> wrote in message
news:MX***************@newssvr14.news.prodigy.com. .. in the codebehind portion of a page, I dynamically create a series of hyperlinks that I add to the page.
in that code, I have something like this:
dim h as new hyperlink
h.NavigateURL = "/somepage.aspx?age=35&gender=M"
Unfortunately, when it renders the HTML page, it changes the ampersand in the URL as follows
h.NavigateURL = "/somepage.aspx?age=35&gender=M"
This, of course, doesn't work, because the 2nd parameter's name has now
been changed from 'gender' to 'amp;gender'
How can I get around this?
(I tried setting the 'href' attribute directly ... h.attributes.add("href","/somepage.aspx?age=35&gender=M") ... but it produces the same result) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Nielsen |
last post by:
Hi
Question regarding Content Management Server and C#
string survey = thisPosting.Placeholders.Datasource.RawContent.ToString()
Label1.Text = survey
Label1 shows correctly the value:...
|
by: Amir Eshterayeh |
last post by:
Dear Friends
My asp hyperlink goes to relative address instead of absolute. I like
navigate url goes to outsite link like www.asp.net but now, it goes to
www.mysite/www.asp.net
please help....
|
by: Ryan Harvey |
last post by:
Hi all,
I have written a web user control that contains a repeater control. the
ItemTemplate for this control is basically 6 Hyperlinks in a row, that are
dynamically allocated one of 7 gif...
|
by: Jason |
last post by:
I have a data grid with a hyperlink column. The hyperlink is created by a
class that extracts the link from an XML Document. How can I populate the
hyperlink column in the data grid with the...
|
by: david |
last post by:
Hi, all:
I need a help from you about DataGrid control.
I created a DataGrid, dg, in design view of .NET visual Stadio and use the
builder to add a Hyperlink column to dg.
I want to try to assign...
|
by: VB Programmer |
last post by:
I have a datalist with a hyperlink in the Item Template.
When I set the NavigateUrl simply to this, the databound CategoryId shows up
fine:
<asp:HyperLink id=hlLink runat="server"...
|
by: Andy |
last post by:
Hi,
This is one of those things I thought should e easy...
I'm programatically trying to set the navigateURL property in a hyperlink in
the headertemplate of a repeater, but always get the...
|
by: Jeff |
last post by:
ASP.NET 2.0
I'm wondering how to set the color of a visited HyperLinkField (the link
text) in a GridView??
Here is the markup of the HyperLinkField I have problems with:
<asp:HyperLinkField...
|
by: BobLaughland |
last post by:
Hi There,
I need a control on my site that is a hyperlink style control, but it
must,
1) Have a property that can hold where the hyperlink is pointing to.
(e.g. like the NavigateUrl property...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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,...
|
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...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
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...
| |