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

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...Passing Parameters to PagesPassing Parameters to Pages
Previous
 
Next
New Post
4/7/2011 8:46 AM
 
How can I pass parameters, in the form of a query string, from one page to another?

I understand how to process the string by using a module on that page. I have a set of menu options, all of which point to the same page - PageA. What I'd like to be able to do is do something like PageA?search=menuOptionA.

I've looked at the Advanced Options for a page under Link URL. I see 4 parameters: URL (A link to an external resource), Page (A page on your site), File (A file on your site). Ideally, I'd like to use Page, but all I get is a drop down box of pages, which does not allow me to add the query string. The alternative is to use external URL. The problem is, at present, I am running on localhost. In future I would like to deploy to a public host. In this light, I would not want to add http://localhost/my site/PageA.aspx?search=OptionA to every indivudual page and then have to replace when going live. How can I point to an internal page using URL, without specifying localhost?

Thanks
ThreeMarks.
 
New Post
7/29/2015 4:19 AM
 
Hi TreeMarks,

just came over this issue myself - did you found a solution for it?

Thanks and best regards

RaWi
 
New Post
7/29/2015 7:42 AM
 

As it should be quite easy to add a parameter in the querystring when you do it eg. in an HTML module (just write them down), I assume you are trying this to achieve this from a module in the code behind to be populated dynamically.

The solution is Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(...)). You have different options, but the one you are looking for is propably one of these two:

Globals.NavigateURL(string controlKey, params string[] additionalParameters)
Globals.NavigateURL(int tabID, string controlKey, params string[] additionalParameters)

In any case, the additionalParameters variable must contain strings, something like name1, value1, name2, value2...

This could be eg (pseudo code)

int forumID = ForumsController.GetForum(thisone);
int threadID = ThreadsController.GetThread(forumID, "Passing Parameters To Pages");
Globals.NavigateURL(String.Empty, new string[] ({ "forumid", Convert.ToString(forumid), "threadid", Convert.ToString(threadID), "scope", "posts" });

to get this page here (just to give you an idea).

Happy DNNing!
Michael


Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
New Post
7/29/2015 10:36 AM
 
Thanks for your response Michael,

actually, I am looking for a much simpler case without programming.
I have a page which contains a Bootstrap-Tab Panel. Each tab can be preselected using query parameter e.g. http://web.com/pagename?tab=02
Now I like to add a DNN-Menu entry for each tab and use the "page in your side" link feature. But I can only select the page but can not add a query string parameter to it.
That is exactly what ThreeMarks described in the initial entry above.
As a workaround, I used the external URL, but I have to modify the server part of it all the time when I deploy from staging to production server.
I assume there is no build in possibility without changing the DNN code.
Maybe this feature can be added to the wish list :-)

Thanks again

Ralf

 
New Post
7/30/2015 5:02 AM
 

Ralf,

I understand. Well, the workaround is indeed what you have described. The wishlist has a name here: Community Voice. Please check if someone else came up with this idea and vote for it, or - if not - post it there. Give us the link to it here, so we can support you with the votes.

Happy DNNing!
Michael

 


Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...Passing Parameters to PagesPassing Parameters to Pages


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