?
Solved

how do i navigate from one control to another in a module in dotnetnuke

Posted on 2009-02-10
2
Medium Priority
?
458 Views
Last Modified: 2012-05-06
I am developing a module in dotnetnuke.
It has controls as EditModulename.ascx,ViewModulename.ascx and New1.ascx.
This module is on home page, when i run this it shows the ViewModulename.ascx control on home page.
         
Now i have one link button cmdL1, I want to display a New1.ascx control after clicking on cmdL1 button. How can i do this?

I tried as follows but it didn't work. it gives "Property evaluation failed" exception.

Thank You.
<asp:LinkButton ID="cmdL1" runat="server" Font-Size="X-Small"
                        OnClick="cmdL1_Click"
                        CausesValidation = "false" 
                        ForeColor="Red">New Order</asp:LinkButton>
========================================================  
      Protected Sub cmdL1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdNewOrder.Click
            Dim HKTabId As Integer
            Dim hkModuleID As Integer
            Dim objModules As New ModuleController
            Dim HK_Module As ModuleInfo = objModules.GetModuleByDefinition(PortalSettings.PortalId, "HK")
            If HK_Module Is Nothing Then
                Exit Sub
            Else
                HKTabId = HK_Module.TabID
                hkModuleID = HK_Module.ModuleID
            End If
 
            Try
                'Response.Redirect(NavigateURL(PortalSettings.ActiveTab.TabID) & "mid=" & hkModuleID")
                Dim ReturnUrl As String = HttpContext.Current.Request.RawUrl
                If ReturnUrl.IndexOf("?returnurl=") <> -1 Then
                    ReturnUrl = ReturnUrl.Substring(0, ReturnUrl.IndexOf("?returnurl="))
                End If
                ReturnUrl = HttpUtility.UrlEncode(ReturnUrl)
 
                If HKTabId <> -1 And Request.QueryString("override") Is Nothing Then
                    ' user defined tab
                    Response.Redirect(NavigateURL(HKTabId, "returnurl=" & ReturnUrl), True)
                Else
                    ' portal tab
                    If HKTabId <> -1 Then
                        Response.Redirect(NavigateURL(HKTabId, "New1", "mid=" & hkModuleID, "returnurl=" & ReturnUrl), True)
                    Else
                        Response.Redirect(NavigateURL(HKTabId, "New1", "mid=" & hkModuleID, "returnurl=" & ReturnUrl), True)
                    End If
                End If
            Catch exc As Exception    'Module failed to load
                ProcessModuleLoadException(Me, exc)
            End Try
 
        End Sub

Open in new window

0
Comment
Question by:madhav_ghatole
2 Comments
 
LVL 15

Assisted Solution

by:Praveen Venu
Praveen Venu earned 600 total points
ID: 23599460
0
 
LVL 3

Accepted Solution

by:
erw13n earned 900 total points
ID: 23608701
Try use editurl and not navigateurl

Response.Redirect(EditURL("New1", "mid=" & hkModuleID, "returnurl=" & ReturnUrl), True)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question