473,386 Members | 1,958 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,386 software developers and data experts.

Hyperlink NavigateUrl

Hello,

When I set a hyperlink server control's NavigateUrl
to

Webform.aspx?a=0&b=0

it outputs

Webform.aspx?a=0&b=0

as the href. Is there a reason for this url encoding?
Is there a way to have it not do this? Thanks!

Nov 17 '05 #1
5 3946
yes - you can try to set it via a template column

See this for an explanation

http://datawebcontrols.com/faqs/Hype...leQuerystringV
alues.shtml

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------

"Mark Fox" <in**@solelsoftware.com> wrote in message
news:09****************************@phx.gbl...
Hello,

When I set a hyperlink server control's NavigateUrl
to

Webform.aspx?a=0&b=0

it outputs

Webform.aspx?a=0&amp;b=0

as the href. Is there a reason for this url encoding?
Is there a way to have it not do this? Thanks!

Nov 17 '05 #2
John,

The link you provided explains how to use the
Datagrid's template column. I am not using the hyperlink
in a datagrid and even if I was it still doesn't seem to
explain how to tell ASP.NET to not UrlEncode the Navigate
Url property, since the text being sent to property would
still get UrlEncoded whether put together in a template
column or set programatically in the code behind (as my
code is doing). Do you know how to stop ASP.NET from
UrlEncoding the href? Thanks!
-----Original Message-----
yes - you can try to set it via a template column

See this for an explanation

http://datawebcontrols.com/faqs/Hype...HyperlinkWithM ultipleQuerystringValues.shtml

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------

"Mark Fox" <in**@solelsoftware.com> wrote in message
news:09****************************@phx.gbl...
Hello,

When I set a hyperlink server control's NavigateUrl to

Webform.aspx?a=0&b=0

it outputs

Webform.aspx?a=0&b=0

as the href. Is there a reason for this url encoding?
Is there a way to have it not do this? Thanks!

.

Nov 17 '05 #3
Hi Mark,

Thank you for posting to the MSDN newsgroups. We are acknowledging your
post and you should receive response from the community within 2 business
days of your post.

If you have any concerns, please feel free to let us know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 17 '05 #4
Hi Mark,

As I understand, we can reproduce the problem with the following steps:

1. Create a default web application.

2. Add a HyperLink asp control to the web form.

3. In the properties window, set the NavigateUrl to "Webform1.aspx?a=0&b=0".

4. In the HTML View, we will see that the NavigateUrl is
"Webform1.aspx?a=0&amp;b=0".

The reason of converting a string into an HTML-encoded string is for
reliable HTTP transmission from the Web server to a client. We can build
and run the web application. When click the HyperLink, we can see the
correct Url in the Address bar - "Webform1.aspx?a=0&b=0".

Does it answer your question? If I have misunderstood your concern, please
feel free to let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 17 '05 #5
Jacob,

Thank you for your response. Yes, it exactly
answered my question! As long as all browsers (not just
Internet Explorer) recognize the encoding, it shouldn't
be a problem. Thanks for your help!
-----Original Message-----
Hi Mark,

As I understand, we can reproduce the problem with the following steps:
1. Create a default web application.

2. Add a HyperLink asp control to the web form.

3. In the properties window, set the NavigateUrl to "Webform1.aspx?a=0&b=0".
4. In the HTML View, we will see that the NavigateUrl is
"Webform1.aspx?a=0&b=0".

The reason of converting a string into an HTML-encoded string is for reliable HTTP transmission from the Web server to a client. We can build and run the web application. When click the HyperLink, we can see the correct Url in the Address bar - "Webform1.aspx?a=0&b=0".

Does it answer your question? If I have misunderstood your concern, please feel free to let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
.

Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
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....
1
by: Mark | last post by:
Ok this is very odd. I have a hyperlink server control (not a linkbutton) on my .aspx page. When the navigateurl property is set to a file (blah.aspx) in the same directory as the current page,...
0
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...
5
by: Martin Dew | last post by:
Having some problems getting a hyperlink object to work in my repeater control, It displays the text I have asked it to for the hyperlink, but it does not act as a link. My repeater code is below...
2
by: Robson Carvalho Machado | last post by:
Dear friends, I'm dynamically creating a Hyperlink with spacer.gif as ImageURL that is an 1px transparent image only to determine link position, but as I create this link dynamically I could not...
4
by: Lan H. Nguyen | last post by:
I have this line of code in my .aspx page <asp:HyperLink ID="hrefView" CssClass="main" ForeColor="blue" Runat="server" NavigateUrl='<%# "View.aspx?id=" + ID.ToString()%>'>View...
4
by: Tomek R. | last post by:
Hello ! This post does'nt regard column hyperlink. I just have single hyperlink and want to create it's NavigateUrl dynamically. This is my test page <form id="Form1" method="post"...
4
by: Satya | last post by:
Hi all, The following code is throwing a run time error "The server tag is not well formed. " <ItemTemplate> <asp:HyperLink Runat="server" ID="lnkFile"...
2
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...
6
by: Dmitry Duginov | last post by:
I have a FormView and a HyperLink on the page. If I use the following code behind (hooked up to Hyperlink's OnLoad event), it renders fine protected void link_Load(object sender, EventArgs e)...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.