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 vs EditUrlNavigateUrl vs EditUrl
Previous
 
Next
New Post
5/14/2008 12:48 PM
 

Even after some searching, I am not precisely clear about the differences between the NavigateUrl & EditUrl methods, and when should I use which one???

In would be extremely helpful, if somebody could explain precisely their differences, and intended uses???

Also, I passed a string "Action=Add" in cmdArgs of EdittUrl. How do I retrieve it on the destination control???

 
New Post
5/15/2008 3:52 AM
 

Can someone please explain the parameters in the following overload of EditUrl:

"Public Function EditUrl(ByVal KeyName As String, ByVal KeyValue As String, ByVal ControlKey As String, ByVal ParamArray AdditionalParameters() As String) As String"

I mean every control (except the primary View Control) has a key associated to it. So, what does KeyName or KeyValue signify here??? What should be passed as their values?

Also, what are AdditionalParameters? Is there any special syntax to be used for strings being passed to AdditionalParameters???
 Are they passed to the destination page in its QueryString?? (In my case, I tried to pass "Action=Add" as Additional Parameter, but could not retrieve anything like that on the destination control)!!!

 
New Post
5/15/2008 2:34 PM
 

The function of the additional parameters is indeed as you described. If you put "Action=Add" as your additional parameter this parameter will be accessible as a querystring parameter on your destination page.

Stephan
www.mexmax-internet.com

 
New Post
5/15/2008 3:02 PM
Accepted Answer 

You want to use EditUrl when you are navigating to a sub control of your current control (using a Control Key).  If you are navigating anywhere else, use NavigateUrl.  The main difference, (aside from the different signatures) is that EditUrl will include mid=(your module's ID) in the querystring so that DNN knows how to load the control you are trying to load based on the control key.

The most basic scenario for EditUrl is where you just need to get to a sub control with a control key of "Edit".  That's where you'll just use EditUrl() without any parameters.  Say that the control key is "DisplayOptions," then use EditUrl("DisplayOptions").

Now, the "tricky" part is when you want to pass custom parameters.  For the first parameter, use those KeyName, and KeyValue parameters (so, EditUrl("Action", "Add", "DisplayOptions") ).  If you have other parameters, use the AdditionalParamters array, like so: EditUrl("Action", "Add", "DisplayOptions", "pid=1", "lid=2", "xid=3").  The reason this seems kind of weird is that EditUrl is written with the edit scenario in mind, where you'd do something like EditUrl("itemId", 3, "EditItem"), where you often need to keep track of just one parameter (the item you are editing).

All of these parameters should show up on the querystring (all EditUrl is doing, after all, is creating a URL).  In the receiving control, you should be able to get at them by calling Request.QueryString("Action"), etc.

If that isn't working, take a look at the URL that EditUrl is generating, and see whether those values are getting put on it.

Hope that helps,


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
New Post
5/15/2008 7:26 PM
 

And you can get some helpful information from here :http://www.adefwebserver.com/DotNetNukeHELP/NavigateURL/ !  The tutorial shows the detail of the NavigateURL function and his paramaters!

Hope that helps for you, also!


sunblognuke v5 for dnn

Ultimate Blogging Module for DotNetNuke Platform
The professional provider of DotNetNuke support, skin design and custom module development.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0NavigateUrl vs EditUrlNavigateUrl vs EditUrl


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