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

Posted on 2009-02-10
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"


                        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


                HKTabId = HK_Module.TabID

                hkModuleID = HK_Module.ModuleID

            End If


                '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)


                    ' portal tab

                    If HKTabId <> -1 Then

                        Response.Redirect(NavigateURL(HKTabId, "New1", "mid=" & hkModuleID, "returnurl=" & ReturnUrl), True)


                        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

Question by:madhav_ghatole
    LVL 15

    Assisted Solution

    by:Praveen Venu
    LVL 3

    Accepted Solution

    Try use editurl and not navigateurl

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

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    This video discusses moving either the default database or any database to a new volume.

    728 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now