Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  NavigateURL behavior
Previous Previous
 
Next Next
New Post 5/18/2006 1:35 AM
User is offline Kristian Radolovic
11 posts
www.5f-pula.hr
10th Ranked


NavigateURL behavior 
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 12:43 PM
User is offline Michael Flanakin
994 posts
www.michaelflanakin.com
7th Ranked




Re: NavigateURL behavior 
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 1:38 PM
User is offline Kristian Radolovic
11 posts
www.5f-pula.hr
10th Ranked


Re: NavigateURL behavior 
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 Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  NavigateURL behavior
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


ADefWebserver.com
DotNetNuke® Module Development Help Website
ADefWebserver.com
Get Smarter Mail, SmarterStats, SmarterTickets
Windows mail server, web log analytics, and customer service management software - Free Editions Available!
www.smartertools.com
DotNetNuke Modules, Skins, Training and Consulting
If you want DotNetNuke done right then look no further. Developed Solutions provides module development, skin design, user and developer training and consulting. Based in Adelaide, Australia, we offer our services worldwide.
www.developedsolutions.com.au

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP