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.0Load UserControl (ascx)Load UserControl (ascx)
Previous
 
Next
New Post
3/17/2008 4:01 PM
 

Prowler - wondering where your Request.Params is coming from?  I have been looking into this for some time and this makes perfect sense to me but I am also still new to programming within DNN.  Do you have any other code to go with your example? 

SDFprowler wrote
If Request.Params("go") = "sum" Then
                Dim objModule As Entities.Modules.PortalModuleBase = Nothing
                objModule = CType(LoadControl("DNNReportingPolSum.ascx"), Entities.Modules.PortalModuleBase)
                objModule.ModuleConfiguration = ModuleConfiguration
                Controls.Add(objModule)
            Else
                Dim objModule As Entities.Modules.PortalModuleBase = Nothing
                objModule = CType(LoadControl("DNNReportingStart.ascx"), Entities.Modules.PortalModuleBase)
                objModule.ModuleConfiguration = ModuleConfiguration
                Controls.Add(objModule)
            End If

I use this for my datalist and it works fairly good but still not navigating to another control:

 

Protected Sub dlContacts_ItemCommand(ByVal source As Object, ByVal e As DataListCommandEventArgs)

Select Case e.CommandName
Case "Insert"
InsertContact(e)
Exit Sub
Case "Edit" 
EditContact(e)
Exit Sub
Case "Select"
SelectContact(e)
Exit Sub 
Case "Delete" 
DeleteContact(e) 
Exit Sub 
Case "Cancel" 
CancelContact(e)
Exit Sub 
Case "Update" 
UpdateContact(e)
Exit Sub 
End Select 

End Sub

  Protected Sub EditContact(ByVal e As DataListCommandEventArgs)
' takes user to edit template 
dlContacts.EditItemIndex = e.Item.ItemIndex
dlContacts.DataBind()
End Sub 

Protected
Sub SelectContact(ByVal e As DataListCommandEventArgs)
' displays the selected item details 
dlContacts.SelectedIndex = e.Item.ItemIndex
dlContacts.DataBind()
End Sub 

 ......

 

 

 

 


View Brenden Kehren's profile on LinkedIn
 
New Post
3/18/2008 8:43 PM
 

Is there anything wrong with using a MultiView in this case?  

 

 
New Post
8/21/2008 6:15 AM
 

Thanks for your post about loading differnet controls/modules into another dnn module.

I have a module where I'm trying to do what you desribed.  On postback the control dissappears, so I have to load it every postback.  however the v13wstat3 is being lost; teh user entered values are gone every postback.  How do you alleviate that problem?  I have tried for 3 days but to no avail.  If you have a way to help please let me know.  I/m dying here!

 

More details:  I am loading the control into a panel wrapped in a Telerik ajaz loading panel.

I've tried loading it into the loading panel itself; same result.

I've tried loading it into D.Bauer's placeholder control and it still loses stae in that!

I'm willing to pay someone for a working solutino to this.

Thanks.

 
New Post
8/21/2008 11:56 AM
 

Nothing wrong with using a MultiView, if the modules/forms in question are simple.  But if any of the forms gets complex, you are better off separating them into different controls.

I used a derivative of the example presented by InDyneInc in this link.  They use the concept of a "switchboard" main control, under which, according to your logic, parameters, etc. you load the other user controls. 

The way I have done it, and I have never ran into the problem with v13wstate, is that I have no controls at all in the switchboard module, which is the registered View control for the module.  This is another advantage I see with this method, you don't have to register any of the other user controls, just the main View control.

Hope this helps.

Carlos

 

 
New Post
8/21/2008 6:44 PM
 

Thanks for that information and link, Carlos.  We have managed to solve the issue with the multiview control, and I'll look over the additional information for more complex modules. 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Load UserControl (ascx)Load UserControl (ascx)


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