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.0Navigating to a specific UserControl in my module--how?Navigating to a specific UserControl in my module--how?
Previous
 
Next
New Post
6/9/2008 12:55 PM
 

Hi There,

I'm working on a Quiz module.  I went through Michael Washington's module development guide (which was very helpful).

My first iteration had three UserControls: a View control, an Edit control, and a Settings control.

I am now adding a feature that will allow admins to view all the quizzes that have been taken.  I created a new user control, QuizGrades.

But the problem is, I'm not sure how I can navigate to that UserControl?  I can use EditUrl() and NavigateUrl() in order to get to the Edit and View controls, respectively, and the Settings control shows up as part of the module settings page.  But how do I get to my new QuizGrades control?  I already added it as a control associated with this module, with the key "ViewGrades" and the type of "Admin".

 
New Post
6/9/2008 1:39 PM
 

It looks like what I want is:

DotNetNuke.Common.Globals.NavigateURL("ViewGrades","mid",this.ModuleId.ToString())

Is that right?  First I tried just Globals.NavigateURL("ViewGrades"), but that didn't work.  I noticed that the URL was missing the module ID (which was present in the Edit URL, so I tried manually adding it in, and then it worked.  Then I tried passing mid and the module ID as additional string parameters ot NavigateURL -- and hey, it worked!  But I don't know if that's what you're "supposed" to do.

  -Josh

 
New Post
6/10/2008 11:01 AM
 

Use the EditURL method to build your URL.  It has overloads for just the "ControlKey" and for passing query string parameters.  Keep in mind that this will load your module without the other modules on the page.  In order to get different module controls to load and still display the rest of the page you have to load the controls dynamically.  For an example of loading control dynamically check out the source of the Events module.  Most of the logic is in Events.ascx.vb.

 
New Post
6/10/2008 11:06 AM
 

Golden Snitch is correct, although I'd add that there are several NavigateUrl overloads that allow specification of a ControlKey.  One of these should meet your needs, provided that the "module zoom" DNN behavior that Golden described fits your design requirements.

You always have the option of controlling the view yourself through the use of AJAX and a MultiView control (or similar strategy).

Brandon


Brandon Haynes
BrandonHaynes.org
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Navigating to a specific UserControl in my module--how?Navigating to a specific UserControl in my module--how?


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