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.0Module navigation - 2 views in same moduleModule navigation - 2 views in same module
Previous
 
Next
New Post
6/19/2007 1:58 PM
 

First, I should mention that I have DNN4 installed and running in my VS2005 test environment, and things seem to be working fine.

I created a new module, and it has two view controls: One to view a list, and one to view a detail. In defining the module, I have defined the list view without a key (it is to be the default view), and given a unique key name to the details view.

The list control works great, no problems accessing data or anything. But when I click on an entry, it is supposed to show the details control, but it does not. It only shows a blank page (except for skin and default stuff). If I define the "details" control to have no key and remove the list control, things seem to work: I see the details page but with the message I wrote saying there's a problem. Also, a breakpoint on LoadPage stops when there is no Key defined on the details page, but it does not break when I navigate there with a Key defined.

Does anyone have any suggestions? I've read most of what is out there, and I can't find anything wrong with my technique!

 

In the list, each item is a asp:HyperLink. The page with the module is on: http://localhost:4858/WWD/Home/SpeciesList/tabid/88/Default.aspx, and the page the hyperlinks point to is http://localhost:4858/WWD/Home/SpeciesList/tabid/88/ctl/SpeciesDetails/sid/3/Default.aspx. The highlighted shows the reference, which was gotten from: NavigateUrl='<%# DotNetNuke.Common.Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "SpeciesDetails", "sid="+ Eval("SpeciesID")) %>'

The module definition is included below.

<modules>
    <module>
    <friendlyname>WoodSpecies</friendlyname>
    <cachetime>0</cachetime>
    <controls>
        <control>
            <src>DesktopModules/WoodSpecies/ViewWoodSpeciesNames.ascx</src>
            <type>View</type>
            <helpurl></helpurl>
        </control>
        <control>
            <key>SpeciesDetails</key>
            <src>DesktopModules/WoodSpecies/ViewWoodSpeciesDetails.ascx</src>
            <type>View</type>
            <helpurl></helpurl>
        </control>
        <control>
            <key>Settings</key>
            <title>Wood Species Module Settings</title>
            <src>DesktopModules/WoodSpecies/Settings.ascx</src>
            <type>Edit</type>
            <helpurl></helpurl>
        </control>
    </controls>
    </module>
</modules>

 
New Post
6/19/2007 10:04 PM
 

ModuleID needs to part of the control URL.  I generally build a parameter array and pass it in where you have "sid="+ Eval("SpeciesID")) " but it may be as simple as appending it - "sid="+ Eval("SpeciesID")),"mid=" + moduleid.tostring

 
New Post
6/20/2007 6:40 AM
 

Thank you very much. It works!

My module is generic, and the module itself did not need the moduleID, since the database entries were "factual" and not module-instance specific. It appears the ModuleID in the parameter list is being used by the NavigateURL or framework, even though I don't need it.

Another lesson learned... 
Dekker

 
New Post
6/20/2007 9:33 AM
 

Dekker,

You're welcome.

Yes the framework needs moduleid to load the correct control.  For instance, you could create several modules all with a control key of "details".

Steve

 
New Post
6/30/2007 8:36 AM
 

I am not quite getting the NavigateURL syntax. I have a Gridview with a list of items and want to navigate to a form control to display item details. I have tried setting the grid column containing the link as follows:

<asp:HyperLink ID="hName" Runat="server" Text='<%# Bind("Name") %>' NavigateUrl='<%# DotNetNuke.Common.Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "HotelForm","mid="+ Cstr(ModuleId), "hotelid="+ Eval("HotelID")) %>' />

but I get a runtime error that conversion from string "hotelid=" to type 'Double' is not valid. Any suggestions?

Jon

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module navigation - 2 views in same moduleModule navigation - 2 views in same module


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