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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How do you pass a parameter?How do you pass a parameter?
Previous
 
Next
New Post
10/31/2006 12:11 AM
 
I know how to set up a module and display it in view and edit mode. But how would I pass a querystring (using a hyperlink button) from one page to the next?

I have a gridview where the user would click a button, which would send them to another page with the variable.
 
New Post
10/31/2006 12:44 AM
 

You can pass the parameter literally including the desired control key. 

Say you are passing AdId = 254 to your EditAdControl, you can do the following (the sample below assumes the key value in the control definition is EditAdControl, if you have it simply set to Edit, substitute Edit for EditAdControl below):

http://www.mysite.com/AdvertiserInfo/tabid/38/AdId/254/ctl/EditAdControl/mid/3948/default.aspx

you can have as many parameters as needed:

http://www.mysite.com/AdvertiserInfo/tabid/38/AdId/254/key2/value2/key3/value3/ctl/EditAdControl/mid/3948/default.aspx


Best Regards,

Robert J Collins | Co-Founder & President

Netlogic Corporation

 
New Post
10/31/2006 12:49 AM
 

I forgot to mention you can use the " Globals.NavigateURL" function/method to build the above described URL.


Best Regards,

Robert J Collins | Co-Founder & President

Netlogic Corporation

 
New Post
10/31/2006 8:47 PM
 
Thank you. Your answer prompted me to find the following site:

http://www.adefwebserver.com/DotNetNukeHELP/NavigateURL

which helped me to navigate page-to-page. But I'm not sure how to create the string above using Global.NavigateURL.

For example, using the tutorial example at http://adefwebserver.com/DotNetNukeHELP/DNN_Module4/Default.htm, I was able to create a button which allowed me to navigate from the view to edit page, the code being:

Response.Redirect(Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "edit", "mid=" & objModules.GetModuleByDefinition(PortalSettings.PortalId, "GuestBook").ModuleID))

Which gave me the url: http://localhost/Dot25/GuestBook/tabid/53/ctl/edit/mid/380/Default.aspx

But how would I insert the variables into the above string using Globals.Navigate? The NavigateURL method does seem to allow an argument for that.

Thanks
 
New Post
10/31/2006 10:48 PM
 
Never mind on the last reponse. I had thought the query string needed to be in the exact order you had shown, but the order doesn't matter. All I needed to do was append to the last param. Works great.

Thanks for the help.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How do you pass a parameter?How do you pass a parameter?


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