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 QuestionModule navigation Question
Previous
 
Next
New Post
7/23/2007 9:06 PM
 

 I have 3 controls in my module; View, Edit, and AddRecord.  While in the edit module I select a record from a DropDownList. If the record does not exist I need to navigate to my AddRecord Control. The below syntax will navigate to the following URL http://localhost/dotnetnuke/Home/tabid/37/ctl/AddRecord/mid/-1/Default.aspx and render a blank page. How do I properly navigate to my AddRecord control in this instance? 

ProtectedSub ddlFileName_SelectedIndexChanged(ByVal sender AsObject, ByVal e As System.EventArgs) Handles ddlFileName.SelectedIndexChanged
  If ddlFileName.SelectedValue = "New"Then
    Dim objModules As Entities.Modules.ModuleController = New Entities.Modules.Module.Controller 
    Response.Redirect(NavigateURL(PortalSettings.ActiveTab.TabID,
"AddRecord", "mid=" & CStr(ModuleId)))
  EndIf
EndSub

 
 
 
New Post
7/24/2007 10:41 AM
 

How about response.redirect(EditURL("AddRecord"))


Do you know the truth when you hear it?
Néstor Sánchez
The Dúnadan Raptor -->Follow Me on Twitter Now!
 
New Post
7/24/2007 11:50 AM
 

I changed the control from a View Type control to an Edit Type control (with the same addRecord key, of course) to test your suggestion to no avail. The control I am on IS the edit control and the new option and code you see above navigates to the third control to insert a new record. When I click the link I get the mid/-1/ and nothing is displayed. I manually entered the "mid=447" in code and it correctly navigated to the control. I need to find a way to persist the ModuleID variable in the Edit Module. As I see by the mid/-1/ it is not being retrieved with the above code. It seems I'm missing something here. Do you have any idea as to what it is?

Jon

 
New Post
7/24/2007 3:38 PM
 

Jon,

Do your edit and addrecord controls inherit from PortalModuleBase?  If so, DNN should be hydrating the moduleID for you.  I would verify that it is hydrated on load.  If so, you're somehow losing/overwriting it before/during the IndexChange postback.

Steve

 

 

 
New Post
7/24/2007 6:07 PM
 

DotNetNuke.Entities.Modules.PortalModuleBase is the first line after every class declaration in the codebehind.

Inherits

BUT... this AddRecord control has a FormView on it with a default mode of insert. On the InsertItemTemplate is a custom user control with three dropdownlists, datasources, and several textboxes. I don't think this should cause a problem, but do you think this fourth control could be causing the problem? I ask because the actual navigateURL code above is in the SelectedIndexChanged event of the embedded control and perhaps the ModuldID is not exposed that deep. I may have to create another property on this user control for the ModuleID.

How would I request the ModuleID for the additional property?

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module navigation QuestionModule navigation Question


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