469,592 Members | 1,948 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,592 developers. It's quick & easy.

problem with & in hyperlink.navigate (which is converted to &)

Hello,

I have been searching online for a whole day and couldn't find an answer for
this. I have this hyperlink server control:

------------------------------------------------------------------------------------
Design mode:

<asp:HyperLink ID="MyHyperlink" Runat="server"
NavigateUrl="#">Forms</asp:HyperLink>

Code-behind:

protected HyperLink MyHyperlink;

MyHyperlink.NavigateUrl = "?Dept=" + Request.QueryString["Dept"] +
"&Sect=forms";
------------------------------------------------------------------------------------

Very straight forward right? I think so too but when it renders the
HTML the "&Sect" part turned into "&Sect" and the whole link would
be

?Dept=HR&Sect=forms

And the problem is that VPN doesn't like that kind of malformed urls.

I am using VS.NET 2003 & VS.NET 2005 (beta).

So, if someone have any idea... :)

Thanks in advance.

P. Mellerin
Oct 21 '05 #1
2 2104
CT
P,

I'm not quite sure what you're asking. If set the NavigateUrl property as
shown below, the link works fine, doesn't it?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"P. Mellerin" <P. Me******@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com...
Hello,

I have been searching online for a whole day and couldn't find an answer
for
this. I have this hyperlink server control:

------------------------------------------------------------------------------------
Design mode:

<asp:HyperLink ID="MyHyperlink" Runat="server"
NavigateUrl="#">Forms</asp:HyperLink>

Code-behind:

protected HyperLink MyHyperlink;

MyHyperlink.NavigateUrl = "?Dept=" + Request.QueryString["Dept"] +
"&Sect=forms";
------------------------------------------------------------------------------------

Very straight forward right? I think so too but when it renders the
HTML the "&Sect" part turned into "&Sect" and the whole link would
be

?Dept=HR&Sect=forms

And the problem is that VPN doesn't like that kind of malformed urls.

I am using VS.NET 2003 & VS.NET 2005 (beta).

So, if someone have any idea... :)

Thanks in advance.

P. Mellerin

Oct 21 '05 #2
The link works fine, it's true. Anyway, it is a malformed url
(http://...?param1=a&amps;param2=b...). And with a reverse-proxy connection,
it is a bad thing... : it intercepts only "&", not "&"... :(((

Is it a Dotnet's "bug by design" ?

"CT" wrote:
P,

I'm not quite sure what you're asking. If set the NavigateUrl property as
shown below, the link works fine, doesn't it?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"P. Mellerin" <P. Me******@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com...
Hello,

I have been searching online for a whole day and couldn't find an answer
for
this. I have this hyperlink server control:

------------------------------------------------------------------------------------
Design mode:

<asp:HyperLink ID="MyHyperlink" Runat="server"
NavigateUrl="#">Forms</asp:HyperLink>

Code-behind:

protected HyperLink MyHyperlink;

MyHyperlink.NavigateUrl = "?Dept=" + Request.QueryString["Dept"] +
"&Sect=forms";
------------------------------------------------------------------------------------

Very straight forward right? I think so too but when it renders the
HTML the "&Sect" part turned into "&Sect" and the whole link would
be

?Dept=HR&Sect=forms

And the problem is that VPN doesn't like that kind of malformed urls.

I am using VS.NET 2003 & VS.NET 2005 (beta).

So, if someone have any idea... :)

Thanks in advance.

P. Mellerin


Oct 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by ashoo | last post: by
4 posts views Thread by | last post: by
5 posts views Thread by Martin Dew | last post: by
6 posts views Thread by FoundThisOnline | last post: by
19 posts views Thread by Joe | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.