Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0NavigateURL behaviorNavigateURL behavior
Previous
 
Next
New Post
5/18/2006 4:35 AM
 
Hi!
Can anyone explain why NavigateUrl behaves differently when used in ascx files and in codebehind. I'm using: DotNetNuke.Common.NavigateURL(70, "Show", "Mid=392", "MyParameter=" + somevalue) in two modules. In the first module it's used in a datagrids itemtemplate hyperlink control and it databinds "somevalue". The grid contains groups od products and when a group is clicked it opens a new tab with a module that displays the products. So, when I click a link i get the correct URL (http://localhost/italcro/Artikli/tabid/70/ctl/Show/Mid/392/MyParameter/101/Default.aspx) and everything is OK. Then I wrote a second module - search. It has 1 label, 1 textbox and 1 imagebutton. In codebehind for ImageButton_Click i put: Response.Redirect(NavigateURL(70, "Show", "Mid=392", "MyParameter=" + TextBox1.Text)). When I click it the page just posts back. Through the debugger I found out that the NavigateUrl formatted the URL differently (http://localhost/italcro/Artikli/tabid/70/ctl/Show/Mid/392/Default.aspx?MyParameter=Test).
Why???
Of course, this way it doesn't work.

Can anyone help.

 
New Post
5/19/2006 3:43 PM
 
They should both produce the same results. It seems as tho there's an issue with the friendly URLs. I've never seen this before. When accessing the parameter, tho, everything should work the same. I've used both and don't notice any differences. I will admit that this might be a bug. My guess is that the problem is when you're calling NavigateURL(), not the function itself. Calling it in code-behind may be too soon or too late to evaluate the URL as expected. Try moving that code to the page's Init event.

Michael Flanakin | Microsoft Consulting Services
www.michaelflanakin.com
 
New Post
5/21/2006 4:38 PM
 
Well, the bug is probably already solved since I'm using DNN 3.1.1. I can't move the code to the Init event because it's a search module and the Reponse.Redirect(NavigateURL... is called in the imagebutton_click event. I solved the issue for now by bulding the URL myself (The TabID and ControlID are entered as module settings).
Thanks anyway.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0NavigateURL behaviorNavigateURL behavior


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out