469,291 Members | 1,797 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Setting the navigate URL

Hi,

How can I set the navigate URL with parameter without extra code?

I have now this:
NavigateUrl="~/test2.aspx?ID=" + <%# Bind("Id") %>

There must be a way to do this with a string function....

Thanks for help!
Nov 19 '05 #1
5 5784
Check out the stringbuilder function...

Dave

Nov 19 '05 #2
Generally the proper way of setting things like that is in the code behind.

However, if for whatever reason you want to do it this way, it would look
more like:
NavigateUrl="~/test2.aspx?ID=<%# Bind("Id") %>" inside the element that your
are setting that attribute on.

Jason Lind
"Arjen" wrote:
Hi,

How can I set the navigate URL with parameter without extra code?

I have now this:
NavigateUrl="~/test2.aspx?ID=" + <%# Bind("Id") %>

There must be a way to do this with a string function....

Thanks for help!

Nov 19 '05 #3
Also, I'm not completly sure if you can set server controls like that...

Jason Lind

"Arjen" wrote:
Hi,

How can I set the navigate URL with parameter without extra code?

I have now this:
NavigateUrl="~/test2.aspx?ID=" + <%# Bind("Id") %>

There must be a way to do this with a string function....

Thanks for help!

Nov 19 '05 #4
This is not posible. ;-(
Nov 19 '05 #5
Ha, I get it done by this:
NavigateUrl='<%# "~/test2.aspx?ID=" + DataBinder.Eval(Container.DataItem,
"Id") %>'

Thanks,
Arjen

"Jason L Lind" <Ja********@discussions.microsoft.com> schreef in bericht
news:02**********************************@microsof t.com...
Also, I'm not completly sure if you can set server controls like that...

Jason Lind

"Arjen" wrote:
Hi,

How can I set the navigate URL with parameter without extra code?

I have now this:
NavigateUrl="~/test2.aspx?ID=" + <%# Bind("Id") %>

There must be a way to do this with a string function....

Thanks for help!

Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by John Hargrove | last post: by
2 posts views Thread by Dan | last post: by
2 posts views Thread by newgenre | last post: by
2 posts views Thread by RAB | last post: by
2 posts views Thread by Ryan Ramsey | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.